Documentation
¶
Overview ¶
Package jsonapi holds the wire-format transforms every handler shares: the metadata key casing (camelCase on the wire, snake_case stored) and the timestamp rendering.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CamelizeDeep ¶
CamelizeDeep transforms every key of the value back to lowerCamelCase.
func CamelizeKey ¶
CamelizeKey reproduces Rails' camelize(:lower): lowerCamelCase from a snake_case or dashed key.
func Timestamp ¶
Timestamp renders t exactly like the reference: RFC3339 with exactly three fractional digits and a Z suffix, e.g. 2026-10-22T11:23:22.953Z.
func UnderscoreDeep ¶
UnderscoreDeep transforms every key of the value (maps, recursively; slices and their maps too).
func UnderscoreKey ¶
UnderscoreKey reproduces Rails' underscore + parameterize('_'): the whole request body (metadata keys included) arrives snake_cased.
Types ¶
This section is empty.