1st-rapid-response-force / Fusion

Dedicated runtime for Server Side functions
1 stars 0 forks source link

Inventory returning using JSON style {} instead of [] #11

Closed mrgwilliam closed 8 years ago

mrgwilliam commented 8 years ago

{"","","TRYK_U_B_ARO1_BLK_CombatUniform",{},"",{},"",{},"",{"","","",""},{},"",{"","","",""},{},"",{"","","",""},{},{"ItemMap","ItemCompass","tf_microdagr","tf_anprc152_1"},"",""}

Needs to be stored as ->

["","","TRYK_U_B_ARO1_BLK_CombatUniform",[],"",[],"",[],"",["","","",""],[],"",["","","",""],[],"",["","","",""],[],["ItemMap","ItemCompass","tf_microdagr","tf_anprc152_1"],"",""]

I confirmed that this works by inputting that manually into the database and then recovering, worked like a charm, however the default save is messing up the []

AJCStriker commented 8 years ago

The issue is the curly brackets are not JSON. That entire block is invalid JSON.

I need to know more about what you are actually sending out. If possible send an array instead of a string so I can directly serialise it.

On Friday, 18 March 2016, Guillermo Rodriguez notifications@github.com wrote:

Assigned #11 https://github.com/1st-rapid-response-force/Fusion/issues/11 to @AJCStriker https://github.com/AJCStriker.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/1st-rapid-response-force/Fusion/issues/11#event-594527430

mrgwilliam commented 8 years ago

["","","TRYK_U_B_ARO1_BLK_CombatUniform",[],"",[],"",[],"",["","","",""],[],"",["","","",""],[],"",["","","",""],[],["ItemMap","ItemCompass","tf_microdagr","tf_anprc152_1"],"",""] gets sent to the server, for some reason it turns it into curly brackets

When the command runs it simply grabs the curly braces instead of the correct [] braces

AJCStriker commented 8 years ago

I can stringify it or store it as JSON.

I'll probably just stringify it.