Maker API JSON_OBJECT formatting issue/questions

I have a question regarding the info from the Maker API. When I go the URL suggested under Get Device Info (replace [Device ID] with actual subscribed device id, I get the device info as expected.

I am looking at an Amazon Echo device so there is a lot of information. Most of it is very clear how to use it if I wanted to. For example:

{
"name": "alexaWakeWord",
"currentValue": "ALEXA",
"dataType": "STRING"
},

The value is a string and so I can do anything I might want to do with a string. My problem is with those items that have "dataType": "JSON_OBJECT". Here is an example:

    {
      "name": "alexaPlaylists",
      "currentValue": "{Upgraded Audio=[{entryList=null, playlistId=22334d14-4c01-4b2e-8e78-09fca7638526, title=Upgraded Audio, trackCount=34, version=37}]}",
      "dataType": "JSON_OBJECT"
    },

When I look at the contents of currentValue, I get this

{Upgraded Audio=[{entryList=null, playlistId=22334d14-4c01-4b2e-8e78-09fca7638526, title=Upgraded Audio, trackCount=34, version=37}]}

I tried feeding this into JSONLint at JSONLint.com and it reformatted it to this:

{
	Upgraded Audio = [{
		entryList = null,
		playlistId = 22334 d14 - 4 c01 - 4 b2e - 8e78 - 09 fca7638526,
		title = Upgraded Audio,
		trackCount = 34,
		version = 37
	}]
}

When I then tried to validate the JSON, it failed as I expected it to. I then reformatted it by hand to the JSON format I am familar with which was this:

{
	"Upgraded Audio": [{
		"entryList": null,
		"playlistId": "22334 d14 - 4 c01 - 4 b2e - 8e78 - 09 fca7638526",
		"title": "Upgraded Audio",
		"trackCount": 34,
		"version": 37
	}]
}

This passed the validation without any problem.

  1. Is the JSON_OBJECT format that I get from the Maker API a standard type of JSON that I am unfamiliar with?
  2. If so, is there a name for this type of format?
  3. Is anyone familiar with a method of converting it to what I will refer to as standard JSON (though I am not an expert to know if that is an accurate designation)?
  4. Is this an error (though obscure) within the Maker API interface?
  5. If so, is it significant enough that it will be fixed in some future release?
  6. If so, am I correct that it is one many things that will be worked on and so I shouldn't have any particular expectation of a timeline?
    edit addition
    Another alternative I thought of is that the Maker API is getting this info from the device driver and in this case it is possible that the driver is telling the Maker API app that the data is JSON when it is that driver that is actually sending the non-JSON format.
  7. Is this the source of my challenge?
1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.