Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add support for formatJson() undocumented flags 256 and 512 #76

Closed
lvcabral opened this issue May 7, 2024 · 0 comments · Fixed by #79
Closed

Add support for formatJson() undocumented flags 256 and 512 #76

lvcabral opened this issue May 7, 2024 · 0 comments · Fixed by #79
Assignees
Labels
enhancement New feature or request

Comments

@lvcabral
Copy link
Collaborator

lvcabral commented May 7, 2024

From the community slack by @TwitchBronBron :

The docs for FormatJson(json as Object, flags = 0 as Integer) as String is missing information on some of the flags. For example, flag 256 which converts non-serializable values into null rather than printing a parse error and returning invalid.
Could we get those docs updated with all the supported flags?
https://developer.roku.com/en-ca/docs/references/brightscript/language/global-utility-functions.md#formatjsonjson-as-object-flags--0-as-integer-as-string

Quote from Slack by @unwiredben

The undocumented flags for FormatJson are 256 - UnsupportedIgnore and 512 - UnsupportedAnnotate - these control what happens when an object in the AA isn't something that can be represented by JSON, like a roWhatever instance. Ignore just has it output as a null, while Annotate makes it a JSON string of the format "".

@lvcabral lvcabral added the enhancement New feature or request label May 7, 2024
@lvcabral lvcabral changed the title Add support for formatJson() undocumented flag 256 Add support for formatJson() undocumented flags 256 and 512 May 18, 2024
@lvcabral lvcabral self-assigned this Jun 13, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant