Browse Source

Revert "Fix unmarshal for escaped strings."

This reverts commit 581255bf23af90b77bb2b6e2671b40e2b565754e.
Jeroen van Rijn 3 years ago
parent
commit
29b2c04766
1 changed files with 0 additions and 5 deletions
  1. 0 5
      core/encoding/json/parser.odin

+ 0 - 5
core/encoding/json/parser.odin

@@ -281,11 +281,6 @@ parse_object :: proc(p: ^Parser) -> (value: Value, err: Error) {
 
 
 // IMPORTANT NOTE(bill): unquote_string assumes a mostly valid string
 // IMPORTANT NOTE(bill): unquote_string assumes a mostly valid string
 unquote_string :: proc(token: Token, spec: Specification, allocator := context.allocator) -> (value: string, err: Error) {
 unquote_string :: proc(token: Token, spec: Specification, allocator := context.allocator) -> (value: string, err: Error) {
-	if allocator.data == nil {
-		// We were called from `unmarshal_count_array`, return early.
-		return "", nil
-	}
-
 	get_u2_rune :: proc(s: string) -> rune {
 	get_u2_rune :: proc(s: string) -> rune {
 		if len(s) < 4 || s[0] != '\\' || s[1] != 'x' {
 		if len(s) < 4 || s[0] != '\\' || s[1] != 'x' {
 			return -1
 			return -1