Serialize JavaScript to a superset of JSON that includes regular expressions and functions.
-
Updated
Jun 11, 2020 - JavaScript
I believe better examples should be provided for anyone new to this library that uses the same convention as encoding/gob.
Decoding:
var foo map[string]string
if err = gob.NewDecoder(file).Decode(&foo); err != nil {
return err
}Encoding:
buf := new(bytes.Buffer)
if err := gob.NewEncoder(buf).Encode(foo); err != nil {
return err
}Note: file is `*os
Add a description, image, and links to the serialize topic page so that developers can more easily learn about it.
To associate your repository with the serialize topic, visit your repo's landing page and select "manage topics."