Skip to content

Commit

Permalink
Add back v1 implementation
Browse files Browse the repository at this point in the history
This pulls in the v1 "encoding/json" implementation at commit 99dad5281660c4e644602e0c8790dd24b3eb45f3.

For all Marshal and Encoder.Encode calls, we execute both v1 and v2
and verify that it is byte-for-byte identical.

For all Unmarshal and Decoder.Decode calls, we execute both v1 and v2
if unmarshaling into a zero'd Go value and verify that
the values a deeply equal.
  • Loading branch information
dsnet committed Jan 14, 2025
1 parent ac4e8cd commit 8df8e9f
Show file tree
Hide file tree
Showing 11 changed files with 3,227 additions and 12 deletions.
2 changes: 2 additions & 0 deletions migrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ echo "pkg encoding/json, type Options = jsonopts.Options #$ISSUE" >> $GOROOT/api
echo "pkg encoding/json, type RawMessage = jsontext.Value #$ISSUE" >> $GOROOT/api/$FILE
echo "pkg encoding/json, type UnmarshalTypeError struct, Err error #$ISSUE" >> $GOROOT/api/$FILE
echo "pkg encoding/json, type Unmarshaler = json.Unmarshaler #$ISSUE" >> $GOROOT/api/$FILE
echo "pkg encoding/json, var CheckMarshalResults func(string, []uint8, []uint8, error, error) #$ISSUE" >> $GOROOT/api/$FILE
echo "pkg encoding/json, var CheckUnmarshalResults func(string, []uint8, interface{}, interface{}, error, error) #$ISSUE" >> $GOROOT/api/$FILE
echo "pkg encoding/json/jsontext, func AllowDuplicateNames(bool) jsonopts.Options #$ISSUE" >> $GOROOT/api/$FILE
echo "pkg encoding/json/jsontext, func AllowInvalidUTF8(bool) jsonopts.Options #$ISSUE" >> $GOROOT/api/$FILE
echo "pkg encoding/json/jsontext, func AppendQuote[\$0 interface{ ~[]uint8 | ~string }]([]uint8, \$0) ([]uint8, error) #$ISSUE" >> $GOROOT/api/$FILE
Expand Down
Loading

0 comments on commit 8df8e9f

Please sign in to comment.