>From my server I'd like to respond with JSON content—a JSON object that
will contain as one of its properties a stringified JSON object that will
be retrieved from the database. What is the best way to send the
stringified JSON object from the database as JSON and not as a string-type
value of a property in the bigger JSON object the server is responding
with? I know I can unmarshal the string into a Go struct and then add it to
the bigger struct that will be marshalled into JSON and sent off as the
response. But that's a lot of extra work for the server (and could
potentially introduce a small error along the way).
Really all that needs to be done to the stringified JSON object retrieved
from the database is that it shouldn't have quotes around it. What's the
best way to avoid the unmarshal-and-then-marshal technique?
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.