Discover Packages
github.com/usnistgov/ndn-dpdk
core
jsonhelper
package
Version:
v0.0.0-...-6c4fd92
Opens a new window with list of versions in this module.
Published: May 17, 2024
License: NIST-PD-fallback
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package jsonhelper provides JSON-related helper functions.
func CleanCgoStruct(input any ) any
CleanCgoStruct cleans roundtripped object from a cgo-generated structure.
It deletes padding and reserved fields, then converts object keys to lowerCamalCase.
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.