Skip to content

Commit

Permalink
Fix handling of v attr in JSON simplify (#269)
Browse files Browse the repository at this point in the history
The value corresponding to a v attr should not be further simplified, merely taken as in.
  • Loading branch information
orlade-anz authored Jan 12, 2023
1 parent 59fd5bc commit 863b4ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contrib/json.arrai
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let rec simplify = \j
(:b): b,
(:s): s,
# May be used in some cases to encode arbitrarily-typed values.
(:v): simplify(v),
(:v): v,
(): {},
_: cond {
# Base case: j is a number.
Expand Down
2 changes: 1 addition & 1 deletion contrib/json_test.arrai
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let (:simplify, :tuplify, :decodeSimple, :toJson, :toJsonString, ...) = //{./jso
'true': true,
'false': false,
'zero': 0,
'date': {'ext': 123, 'loc': {}, 'wall': 0},
'date': (ext: 123, loc: {}, wall: 0),
},
),

Expand Down

0 comments on commit 863b4ae

Please sign in to comment.