View Issue Details

IDProjectCategoryView StatusLast Update
0031314RunnerFunctionsPublic2019-09-09 14:20
ReporterYellowAfterlifeAssigned ToRussell Kay 
PriorityLowSeverityC - GeneralReproducibility100%
Status ClosedResolutionFixed 
PlatformWindowsOSWindows 10 ProOS Version>=18362
Product Version2.2.3 
Target Version2.2.4Fixed in Version2.2.4 
Summary0031314: Functions: json_decode turns nulls inside lists into zeroes
Description
var a = json_decode(@'{"list":[1,2,null,null,3]}');
show_debug_message(json_encode(a));


Output:
{ "list": [ 1.000000, 2.000000, 0.000000, 0.000000, 3.000000 ] }


Expected output:
{ "list": [ 1.000000, 2.000000, null, null, 3.000000 ] }
Tagsfunctions
1.4 Found In
2.x Runtime Found In9.9.1.1542
2.x Runtime Verified In2.2.4.355

Activities

YellowAfterlife

2019-08-30 17:04

Developer  

json_decode_null_in_list.yyz (19,285 bytes)

Russell Kay

2019-09-06 12:25

Manager   ~0064736

Fixed in gitlab
NOTE: json null becomes a GML undefined through json_decode(), GML undefined becomes a json null through json_encode()

Dan

2019-09-06 15:36

Adminstrator   ~0064740

Runtime 355+