Type inference rules
- Integer →
intorint64(option) - Float →
float64 - Boolean →
bool - String →
string(RFC 3339 detected astime.Time) - null →
interface{}(consider replacing with a pointer type like*string) - Object → nested
structor extracted type - Array →
[]T(heterogeneous arrays use[]interface{})
Go naming conventions
- Field names converted to PascalCase (capitalized to be exported)
- Common acronyms uppercased: ID, URL, API, HTTP, JSON, XML, UUID, SQL
- Original JSON keys preserved via
json:"name"tag - Optional
,omitemptyomits zero values during marshaling