Our great sponsors
-
jsend
JSend is a specification for a simple, no-frills, JSON based format for application-level communication.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Hi, I'm trying to make a call to a service I created which returns a JSON response in the JSend format, however I'm really struggling to marshal the response into a normal struct. The payload always seems to be marshaled into a map rather than properly into the struct fields.
I've tried using mapstructure to then marshal the map fields into a struct which mostly works (it struggles with times and custom time types which requires a workaround for each case), but this doesn't feel very idiomatic and requires two passes at marshaling.