package
Version:
v0.0.0-...-c2e30b8
Opens a new window with list of versions in this module.
Published: Jan 26, 2021
License: NIST-PD-fallback
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func Roundtrip(input, ptr interface{}, options ...Option) error
Roundtrip marshals the input to JSON then unmarshals it into ptr.
This is useful for converting between structures.
Option sets an option on json.Decoder.
var DisallowUnknownFields Option = func(d *json.Decoder) { d.DisallowUnknownFields() }
DisallowUnknownFields causes json.Decoder to reject unknown struct fields.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.