Rank: Advanced Member
Groups: Registered
Joined: 3/28/2016(UTC) Posts: 159 Location: SACRAMENTO Thanks: 5 times Was thanked: 19 time(s) in 18 post(s)
|
Version: 18.0.0.59 x64 Link: http://pegttour.com/tour....php?eventID=36&kr=1The above link is used in many custom apps as well as loads fine and validated by http://codebeautify.org/ so although i'm not an expert in JSON i would think it would load in vMix but it does not. No error is provided it just shows gray with nothing. Can you tell me why this is and or fix it if it is a bug. If you believe it is not and it should read it please let me know why so i can pass it to the developer. he's telling me it should be read so here i am :) thanks!
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/13/2010(UTC) Posts: 5,214 Location: Gold Coast, Australia Was thanked: 4302 time(s) in 1523 post(s)
|
Hi, The JSON needs to have an "array" of records in order to work. You can run that JSON through https://konklone.io/json/ to see the problem, it is assigning each row into its own JSON object which won't work unless those objects are all part of an array. Regards, Martin vMix
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 3/28/2016(UTC) Posts: 159 Location: SACRAMENTO Thanks: 5 times Was thanked: 19 time(s) in 18 post(s)
|
admin wrote:Hi, The JSON needs to have an "array" of records in order to work. You can run that JSON through https://konklone.io/json/ to see the problem, it is assigning each row into its own JSON object which won't work unless those objects are all part of an array. Regards, Martin vMix strange json.org shows it to be valid and so does a few other sites. but yours does not. { "1": { "0": "1", "1": "Andy", "2": "Haas", "uid": "1", "first_name": "Andy", "last_name": "Haas", "houston_points": 750, "houston_position": "4" }, "653": { "0": "653", "1": "Clint", "2": "Grover", "uid": "653", "first_name": "Clint", "last_name": "Grover", "houston_points": 280, "houston_position": "13-16" } } it seems it is in proper form. C#\VB.NET reads it fine as well. what parser are you using? so if we were to just remove the overall brackets it could work sense it is an array just not an array of an array? crap now i need to convince them it's not in a particular format since they just come back at me with "look it says its valid". regardless thanks. i'll try to get them to get it to work on your link and go from there -King
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 5/20/2015(UTC) Posts: 493 Location: Copenhagen, Denmark Thanks: 389 times Was thanked: 100 time(s) in 79 post(s)
|
admin wrote:Hi, The JSON needs to have an "array" of records in order to work. You can run that JSON through https://konklone.io/json/ to see the problem, it is assigning each row into its own JSON object which won't work unless those objects are all part of an array. Regards, Martin vMix Wouldn't it be possible if your parser reads the JSON as an object and not a array, to wrap that one object into an array, and parse that to the data sources manager? Best regards from an intrusive danish vMix user :-)
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/13/2010(UTC) Posts: 5,214 Location: Gold Coast, Australia Was thanked: 4302 time(s) in 1523 post(s)
|
Hi,
To clarify, the JSON is valid, but not in a format vMix can use for table data.
vMix can't read JSON as an object as that would require full Javascript integration, instead it needs to rely on the JSON having some sort of table structure, and this means using an array.
Regards,
Martin vMix
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 3/28/2016(UTC) Posts: 159 Location: SACRAMENTO Thanks: 5 times Was thanked: 19 time(s) in 18 post(s)
|
admin wrote:Hi,
To clarify, the JSON is valid, but not in a format vMix can use for table data.
vMix can't read JSON as an object as that would require full Javascript integration, instead it needs to rely on the JSON having some sort of table structure, and this means using an array.
Regards,
Martin vMix that makes sense thank you.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close