fieldcodec

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasJSONModifier

func HasJSONModifier(tag string) bool

HasJSONModifier reports whether a raw theorydb tag includes the json modifier.

func HasJSONTag

func HasJSONTag(tags map[string]string) bool

HasJSONTag reports whether parsed field metadata includes the json modifier.

func NormalizeJSONFieldValue

func NormalizeJSONFieldValue(fieldType reflect.Type, value any) (any, error)

NormalizeJSONFieldValue converts a json-tagged field value into the canonical Go shape used by DynamoDB conversion. Structured fields are normalized into generic JSON-compatible maps/slices/scalars; string-like fields retain text.

func NormalizeJSONReflectValue

func NormalizeJSONReflectValue(fieldType reflect.Type, value reflect.Value) (any, error)

NormalizeJSONReflectValue mirrors NormalizeJSONFieldValue for reflect-based callers handling struct fields.

func UnmarshalJSONFieldValue

func UnmarshalJSONFieldValue(av types.AttributeValue, dest reflect.Value, fallback func() error) error

UnmarshalJSONFieldValue decodes a json-tagged DynamoDB attribute value into a field destination. Structured fields accept both native document values and legacy JSON strings; string-like fields accept both raw strings and native documents re-encoded as JSON text.

Types

This section is empty.

Jump to

Keyboard shortcuts

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