Render examples.

This commit is contained in:
Jeroen van Rijn
2025-10-10 12:24:28 +02:00
parent 4068eeb5fa
commit ece213afca
29 changed files with 146 additions and 139 deletions
+12 -10
View File
@@ -1,15 +1,13 @@
// Encoding and decoding JSON in strict `JSON`, `JSON5` and `BitSquid` variants.
package encoding_json
import "core:strings"
/*
JSON
Encoding and decoding JSON in strict `JSON`, `JSON5` and `BitSquid` variants.
Using one of these `Specification`s.
JSON
strict JSON
JSON5
JSON5
pure superset of JSON and valid JavaScript
https://json5.org/
* Object keys may be an ECMAScript 5.1 IdentifierName.
* Objects may have a single trailing comma.
* Arrays may have a single trailing comma.
@@ -22,17 +20,21 @@ import "core:strings"
* Numbers may begin with an explicit plus sign.
* Single and multi-line comments are allowed.
* Additional white space characters are allowed.
MJSON
pure superset of JSON5, may not be valid JavaScript
https://bitsquid.blogspot.com/2009/10/simplified-json-notation.html
* All the same features as JSON5 plus extras.
* Assume an object definition at the root level (no need to surround entire file with { } ).
* Commas are optional, using comma insertion rules with newlines.
* Quotes around object keys are optional if the keys are valid identifiers.
* : can be replaced with =
*/
package encoding_json
import "core:strings"
Specification :: enum {
JSON,
JSON5, // https://json5.org/