chapter12/

directory
v0.0.0-...-ec09f47 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2020 License: MIT

Directories

Path Synopsis
Extend Display so that it can display maps whose keys are structs or arrays
Extend Display so that it can display maps whose keys are structs or arrays
Modify the S-expression encoder (§12.4) and decoder (§12.6) so that they honr the sexpr:"..." field tag in a similar manner to encoding/json.
Modify the S-expression encoder (§12.4) and decoder (§12.6) so that they honr the sexpr:"..." field tag in a similar manner to encoding/json.
Make display safe to use on cyclic data structures by bounding the number of steps it takes before abandoning the recursion.
Make display safe to use on cyclic data structures by bounding the number of steps it takes before abandoning the recursion.
Implement the missing cases of the encode function.
Implement the missing cases of the encode function.
Modify encode to pretty-print the S-expression in the style shown above
Modify encode to pretty-print the S-expression in the style shown above
Adapt encode to emit JSON instead of S-expressions.
Adapt encode to emit JSON instead of S-expressions.
Adapt encode so that as an optimization, it does not encode a field whose value is the zero value of its type
Adapt encode so that as an optimization, it does not encode a field whose value is the zero value of its type
Exercise 12.8: The sexpr.Unmarshal function, like json.Marshal, requires the complete input in a byte slice before it can begin decoding.
Exercise 12.8: The sexpr.Unmarshal function, like json.Marshal, requires the complete input in a byte slice before it can begin decoding.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL