ID:2581648
 
BYOND Version:513
Operating System:Windows 10 Pro
Web Browser:Chrome 83.0.4103.106
Applies to:Dream Daemon
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary:

world.Profile can produce malformed JSON, specifically JSON that has no value in a key:value pair. It is unclear to me as to why this happens, but I would assume that a simple sanity checking for output values could be implemented.

Example of malformed JSON output:



Numbered Steps to Reproduce Problem:

Unfortunately I do not have a strong indicator of when this happens, I only noticed it when processing profiler data.

Code Snippet (if applicable) to Reproduce Problem:
world.Profile(PROFILE_REFRESH,format="json")


Expected Results:

Valid JSON

Actual Results:

Malformed JSON

Does the problem occur:
Every time? Or how often? Uncertain
In other games? n/a
In other user accounts? n/a
On other computers? Yes

When does the problem NOT occur?

Uncertain

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)

n/a

Workarounds:

n/a (potentially use Regex parsing to detect and correct errors, something I'll likely end up doing)
I was looking at the code that produces this output, and from what I'm seeing that output should not be possible at all. I'm definitely going to need a test case to examine this further.
I have not been able to reliably produce a sample case, but Oranges has suggested this issue is possibly the root cause of this issue: http://www.byond.com/forum/post/2589161
In response to Bobbahbrown
They are unrelated. The JSON produced by world.Profile() does not use the same function and does not have any nested lists.

Login to reply.