JSON format for rest Calls

Hi @darius, @dkayiwa. @wyclif,

What is the standard JSON format for rest api. I was facing this problem only when I was creating vitals. I did not face it in other cases.

This json works:

    {
	"encounterDatetime": "2017-07-12T23:28:00.954+0100",
	"encounterType": {
		"uuid": "67a71486-1a54-468f-ac3e-7091a9a79584"
	},
	"patient": {
		"uuid": "04db0ed3-18a9-4592-bbfc-e465f3b867a0"
	},
	"visit": {
		"uuid": "87c8e197-1e63-4bd1-ac5e-b7c1014993c8"
	},
	"location": {
		"uuid": "58c57d25-8d39-41ab-8422-108a0c277d98"
	},
	"obs": [{
			"concept": "5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
			"obsDatetime": "2017-07-12T23:28:00.954+0100",
			"value": "19",
			"person":"fedaa0cb-974c-4258-ba6c-379653c66ab5"
		}, {
			"concept": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",			
			"obsDatetime": "2017-07-12T23:28:00.954+0100",
			"value": "250",
			"person": "fedaa0cb-974c-4258-ba6c-379653c66ab5"
		}
	]
}

But This JSON format does not work:

{
	"encounterDatetime": "2017-07-12T23:28:00.954+0100",
	"encounterType": {
		"uuid": "67a71486-1a54-468f-ac3e-7091a9a79584"
	},
	"patient": {
		"uuid": "04db0ed3-18a9-4592-bbfc-e465f3b867a0"
	},
	"visit": {
		"uuid": "87c8e197-1e63-4bd1-ac5e-b7c1014993c8"
	},
	"location": {
		"uuid": "58c57d25-8d39-41ab-8422-108a0c277d98"
	},
	"obs": [{
			"concept": {
				"uuid": "5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
			},
			"obsDatetime": "2017-07-12T23:28:00.954+0100",
			"value": "19",
			"person": {
				"uuid": "fedaa0cb-974c-4258-ba6c-379653c66ab5"
			}
		}, {
			"concept": {
				"uuid": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
			},
			"obsDatetime": "2017-07-12T23:28:00.954+0100",
			"value": "250",
			"person": {
				"uuid": "fedaa0cb-974c-4258-ba6c-379653c66ab5"
			}
		}
	]
}

Difference is here:

"concept": {
				"uuid": "5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
			},

And: "concept": "5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",

The correct one is:

"concept": "5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"