Describe the bug
When I use Util.JsonEncode on a LUA Object with index 0 (followed by 1, 2, 3, etc), the returned JSON string represents an array.
LUA "arrays" (as I understand with ipairs) have indices starting with 1, so my example should be considered as an object when it is converted to JSON.
The result string is ["a",true,0.1] but should be {0:"a",1:true,2:0.1}
Expected behavior
When passing to Util.JsonEncode a table containing an index out of the range 1-N (or present in subobjects), it should return an object and not an array
Desktop (please complete the following information):
Have you read our FAQ/Wiki/#before-you-ask ? Yes
Describe the bug When I use Util.JsonEncode on a LUA Object with index 0 (followed by 1, 2, 3, etc), the returned JSON string represents an array. LUA "arrays" (as I understand with ipairs) have indices starting with 1, so my example should be considered as an object when it is converted to JSON.
To Reproduce Steps to reproduce the behavior:
["a",true,0.1]
but should be{0:"a",1:true,2:0.1}
Expected behavior When passing to Util.JsonEncode a table containing an index out of the range 1-N (or present in subobjects), it should return an object and not an array
Desktop (please complete the following information):