Currently in our project we have a certain class which has a String description.
Furthermore we have an object.
Object Foo {
Apple: {parts: 5},
Description: theproblematicobject,
,,,,
}
Description is set up as a type string. Thus the object needs to be serialized to be assigned as the value of the description.
At the end we return foo as a JSONConvert.serializer(foo).
Upon recieve, object foo is nicely formatted JSON
, but the description is still a serialized string.
Is there a combinations of functions I can use how I can serialize the problematic object (so it fits the string type) and upon deserialization on request, it becomes one nicely formatted json instead of.
Result:
"Name": "Friday, 21 October 2016 New...",
"Description": "{\"HoursList\":[],\"EmployeeFullname\":\"..........",
"SwipeLeftAction": null,
"SwipeLeftDescription": null,
"SwipeLeftColor": null,
"SwipeRightAction": null,
"SwipeRightDescription": null,
"SwipeRightColor": null,
"ClickAction": "uiweb/em......."
}
Desired:
"Name": "Friday, 21 October 2016 New...",
"Description": {"HoursList":[],
"EmployeeFullname" : ".........."
}
"SwipeLeftAction": null,
"SwipeLeftDescription": null,
"SwipeLeftColor": null,
"SwipeRightAction": null,
"SwipeRightDescription": null,
"SwipeRightColor": null,
"ClickAction": "uiweb/em......."
}