Browse Source

Rename to SJSON for the Simplified JSON notation variant

gingerBill 3 years ago
parent
commit
f2ecda8fec
2 changed files with 4 additions and 3 deletions
  1. 1 1
      core/encoding/json/parser.odin
  2. 3 2
      core/encoding/json/types.odin

+ 1 - 1
core/encoding/json/parser.odin

@@ -40,7 +40,7 @@ parse_string :: proc(data: string, spec := DEFAULT_SPECIFICATION, parse_integers
 		return parse_object(&p)
 	case .JSON5:
 		return parse_value(&p)
-	case .MJSON:
+	case .SJSON:
 		#partial switch p.curr_token.kind {
 		case .Ident, .String:
 			return parse_object_body(&p, .EOF)

+ 3 - 2
core/encoding/json/types.odin

@@ -33,8 +33,9 @@ package json
 Specification :: enum {
 	JSON,
 	JSON5, // https://json5.org/
-	MJSON, // https://bitsquid.blogspot.com/2009/10/simplified-json-notation.html
-	Bitsquid = MJSON,
+	SJSON, // https://bitsquid.blogspot.com/2009/10/simplified-json-notation.html
+	Bitsquid = SJSON,
+	MJSON = SJSON,
 }