After reading the documentation I didn't find anything about converting TO and FROM JSON string, an object which has not only "base type" attributes, but nested objects
For example:
I have a product which has a name a price and a category.
when I serialize it into a JSON string, I'd like to have a string like the following:
"{\"price\":\"9.99\", \"name\":\"Pac-Man\", \"category\":{\"id\":1,\"name\":\"Videogames\"}}"
Is this already possible?
If so, how can I obtain this result?
Thank you so much for your work!
After reading the documentation I didn't find anything about converting TO and FROM JSON string, an object which has not only "base type" attributes, but nested objects For example: I have a product which has a name a price and a category. when I serialize it into a JSON string, I'd like to have a string like the following: "{\"price\":\"9.99\", \"name\":\"Pac-Man\", \"category\":{\"id\":1,\"name\":\"Videogames\"}}" Is this already possible? If so, how can I obtain this result? Thank you so much for your work!