Changed marshall/unmarshall code to json format.
Tweaking how values are added in marshalling
Reduced code to use new function
Removed used code
Removed now obsolete methods
Merge branch 'tickets/DM-1349'