Skip to content

Conversation

Jerakin
Copy link
Contributor

@Jerakin Jerakin commented Oct 10, 2025

Example for json encode/decode

Tried my hand at adding a simple example.

Let me know if this isn't the format that's expected, or which files to exclude (.gitattributes maybe?).

Copy link
Contributor

@britzl britzl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment

end

function final(self)
local json_string = json.encode(self.player_data) -- <4>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The with this example is that anyone looking at the example won't really be able to run the entire project on the webpage. The result of the code running in final will never be seen when the user navigates away from the example. I think it would be better to show both json.encode() and json.decode() in the example somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants