Hi, list,
I have JSON web API that accepts fields URL parameter, like this:
GET /something/?fields=a,b,c
This is common pattern in web APIs to send partial objects instead of full objects. Suppose struct has fields a,b,c,...z, I don't want to fetch all fields from database, marshall, send, unmarshall, etc. I know I can add tag to struct fields to suppress them in JSON, but that is done at compile-time. Is there a way to do this at run-time, or should I write custom marshaller for this?
Thanks always,
Boris