Merge remote-tracking branch 'offical/master'

This commit is contained in:
2025-10-12 00:52:35 -04:00
272 changed files with 4127 additions and 2670 deletions
+5 -1
View File
@@ -176,7 +176,11 @@ marshal_to_writer :: proc(w: io.Writer, v: any, opt: ^Marshal_Options) -> (err:
return .Unsupported_Type
case runtime.Type_Info_Pointer:
return .Unsupported_Type
if v.id == typeid_of(Null) {
io.write_string(w, "null") or_return
} else {
return .Unsupported_Type
}
case runtime.Type_Info_Multi_Pointer:
return .Unsupported_Type
+12 -9
View File
@@ -1,14 +1,13 @@
package encoding_json
import "core:strings"
/*
JSON
Encoding and decoding JSON in strict `JSON`, [[ JSON5 ; https://json5.org/ ]] and [[ BitSquid ; https://bitsquid.blogspot.com/2009/10/simplified-json-notation.html ]] 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.
@@ -21,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/