Skip to content

Commit

Permalink
cue: reimplement Decode to not use MarshalJSON
Browse files Browse the repository at this point in the history
The roundtrip to JSON resulted in a few incompatibilities

Note that this copies the logic in encoding/json for
parsing json tags and disambiguating names.

Code that previously did a JSON marshal and relied
on that detecting errors before modifying Go values
must now explicitly check for concreteness first.

Fixes #922

Change-Id: I9a55151163183ab84d1269d51f180127869a9a15
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/9522
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
  • Loading branch information
mpvl committed Apr 29, 2021
1 parent a7d3987 commit 819cf95
Show file tree
Hide file tree
Showing 5 changed files with 1,052 additions and 11 deletions.

0 comments on commit 819cf95

Please sign in to comment.