diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-10 15:18:39 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-10 21:48:22 -0700 |
commit | c4ae41eba5e1c86c9a1edcaf80ef10cc3fe62eb1 (patch) | |
tree | e0143fe98828936c100de96826e3194ddf6acc07 /compat/json/borrowed_example_test.go | |
parent | 04daa09e1911d7bdabe87e452200b2de2c5ca7c9 (diff) |
compat/json: Run the example tests
Diffstat (limited to 'compat/json/borrowed_example_test.go')
-rw-r--r-- | compat/json/borrowed_example_test.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compat/json/borrowed_example_test.go b/compat/json/borrowed_example_test.go index fd984cd..5c612eb 100644 --- a/compat/json/borrowed_example_test.go +++ b/compat/json/borrowed_example_test.go @@ -8,12 +8,13 @@ package json_test import ( "bytes" - "encoding/json" "fmt" "io" "log" "os" "strings" + + "git.lukeshu.com/go/lowmemjson/compat/json" ) func ExampleMarshal() { @@ -85,6 +86,7 @@ func ExampleDecoder() { // Ed: Go fmt yourself! } +/* // MODIFIED: we don't have tokens // This example uses a Decoder to decode a stream of distinct JSON values. func ExampleDecoder_Token() { const jsonStream = ` @@ -121,7 +123,9 @@ func ExampleDecoder_Token() { // float64: 1.234 // json.Delim: } } +*/ // MODIFIED: we don't have tokens +/* // MODIFIED: we don't have tokens // This example uses a Decoder to decode a streaming array of JSON objects. func ExampleDecoder_Decode_stream() { const jsonStream = ` @@ -173,6 +177,7 @@ func ExampleDecoder_Decode_stream() { // Ed: Go fmt yourself! // json.Delim: ] } +*/ // MODIFIED: we don't have tokens // This example uses RawMessage to delay parsing part of a JSON message. func ExampleRawMessage_unmarshal() { |