You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 12, 2019. It is now read-only.
Right now, deStruct traverses fields recursively, makes copies, scalars, and children objects. This is rather difficult, and complex. We really shouldn't try to maintain near identical copies of the input data. Instead we should convert it to a basic, but simple interface all handlers can consume.
One option:
Redo this so that there are no copies, and all objects are converted into a field type. The field should have:
Type method which indicates the original type of the field
Name the key for the field
Scalar method which returns a scalar value
String method which returns a string of the scalar value
SubFields method which returns a nested map of sub fields
Fields method which returns a flattened map of sub fields, including the field itself
MarshalJSON self explanatory
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Right now,
deStruct
traverses fields recursively, makes copies, scalars, and children objects. This is rather difficult, and complex. We really shouldn't try to maintain near identical copies of the input data. Instead we should convert it to a basic, but simple interface all handlers can consume.One option:
Redo this so that there are no copies, and all objects are converted into a
field
type. Thefield
should have:Type
method which indicates the original type of the fieldName
the key for the fieldScalar
method which returns a scalar valueString
method which returns a string of the scalar valueSubFields
method which returns a nested map of sub fieldsFields
method which returns a flattened map of sub fields, including the field itselfMarshalJSON
self explanatoryThe text was updated successfully, but these errors were encountered: