I have been working on this bug for about 8 hours now.
Into the function mapJsonToRest I am passing in a JSON object (I have verified it is working inside the functio