View Issue Details

IDProjectCategoryView StatusLast Update
0006085Multi Theft Auto : San AndreasServerpublic2011-05-23 13:11
ReporterKernellAssigned ToGamesnert 
PrioritynormalSeverityblockReproducibilityalways
Status resolvedResolutionfixed 
Platformx64OSWindows 7OS Version7600
Product Version 
Target Version1.1Fixed in Version1.1 
Summary0006085: fromJSON does not work correctly
Description

tab = {};

tab.test = true;
tab.qwerty = true;
tab.zxc = true;

to_js_result = toJSON( tab ); -- [ { "test": true, "qwerty": true, "zxc": true } ]

from_js_result = fromJSON( to_js_result );

for key, value in pairs( from_js_result ) do
outputChatBox( tostring( key ) .. " " .. tostring( value ) );
end

Result in chatbox:
true true

TagsNo tags attached.

Activities

Kernell

2011-05-14 13:37

reporter   ~~0013404

Last edited: 2011-05-14 13:37

testTable = {first='mars',second='venus',third='earth'}

testString = toJSON( testTable )

print( testString )

-- Result:
-- [ { "first": "mars", "third": "earth", "second": "venus" } ]

tab = fromJSON( testString )

table.foreach( tab, print )

-- Result:
-- true true -- WTF???

Gamesnert

2011-05-23 12:06

developer   ~~0013461

Fixed in r2690.

[12:05:29] Console executed command: table.foreach( tab, print )
first mars
second venus
third earth

Issue History

Date Modified Username Field Change