10-14-2017 07:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-14-2017 07:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
On the Ionic I am finding the JSON.stringify fails if the outermost object is an array. I can itterate through the collection and print each one to console, and in the companion I can call JSON.stringify, but it fails on the Ionic. Is there any way around this other than itterating? I'm developing and it is nice to be able to stringify the raw data. The json looks like below, just more elements but still well below the 1027 byte limit.
[{"DisplayText":"Server 1","Status":"Online"}, {"DisplayText":"Server 2","Status":"Offline"}]
Answered! Go to the Best Answer.
Accepted Solutions
10-15-2017 14:49
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


10-15-2017 14:49
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
I'm not sure exactly what the device limit is, but it's definitely shorter than the companion.
You could experiment with different lengths to see which works,
10-14-2017 07:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-14-2017 07:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
The error when calling console.log(JSON.stringify on the object is:
** ERROR: Could not convert log string **
10-14-2017 09:38
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


10-14-2017 09:38
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
@SkipFire wrote:
The error when calling console.log(JSON.stringify on the object is:
** ERROR: Could not convert log string **
Essentially the string is too long to output to the console. This is fixed in the next version, it will truncate automatically.
10-14-2017 11:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-14-2017 11:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
@JonFitbit, so is the limit shorter for the Ionic than for the companion? The same string can be stringified on the companion with no problem. What is the limit for the console.log on the Ionic?
10-15-2017 14:49
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


10-15-2017 14:49
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
I'm not sure exactly what the device limit is, but it's definitely shorter than the companion.
You could experiment with different lengths to see which works,
