[JSON] Geting an error with JSON extension

[JSON] Geting an error with JSON extension

  
Forge Component
(4)
Published on 2015-01-20 by Robert Chanphakeo
4 votes
Published on 2015-01-20 by Robert Chanphakeo
Getting error: "JSON root object has multiple properties. The root object must have a single property in order to create a valid XML document" with JsonToXml. How do I fix this?
Gerry, please copy and paste your input JSON here.
Hello, I've gotten to the same error as OP.

My Json is something like the document attached (Real data removed because of intelectual property - Sorry! Still, same structure)

Any ideas?

Sorry for bringing up such an old post but I'm stuck here
Hi Bruno,

Wrap your json inside another element so it has a single top level element:


{ "root":
 {
	"paging":
	{	"per_page":20,
		"page":1,
		"previous":null,
		"self":"/api/v1/massive_test?per_page=20&page=1",
		"next":null},

	"data":
	[{	"id":12345,
		"description":null,
		"guid":"9638f82a-f497-4626-90fb-c5ae50474f59",
		"name":"Test1",
		"deleted_at":null,
		"created_at":"2014-07-28T10:16:01Z",
		"updated_at":"2014-07-28T10:16:01Z"},

	{	"id":54321,
		"description":null,
		"guid":"33af869a-3b5a-4382-a485-f2e4ff26b404",
		"name":"Test2",
		"deleted_at":null,
		"created_at":"2014-07-28T10:16:02Z",
		"updated_at":"2014-07-28T10:16:02Z"},
		
	{	"id":111111,
		"description":null,
		"guid":"6698a21a-f5af-4fd5-9ef7-1e76d27b7381",
		"name":"Test3",
		"deleted_at":null,
		"created_at":"2014-07-28T10:16:02Z",
		"updated_at":"2014-07-28T10:16:02Z"}]}
}
Regards, João Rosado