Project

General

Profile

Defect #1589

plugins.VelocityReport.fromJSON(<text>) doesn't handle number properties (as string) correctly

Added by Robert Ivens 3 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
01/17/2024
Due date:
% Done:

0%

Estimated time:
Browser (if web client):

Description

It seems that the JSON parser in the plugin does something weird with JSON that have numbers as a property name.
Using JSON.parse(<json>) it does work correctly.

Example:

var jsonTxt = '{"2":"test value"}';
var vr = plugins.VelocityReport.fromJSON(jsonTxt);
application.output(vr); // --> {2:test value}
application.output(vr['2']); // --> <null>
application.output(vr[2]); // --> <null>
var js = JSON.parse(jsonTxt);
application.output(js['2']); // --> test value

History

#1

Updated by Patrick Talbot 3 months ago

  • Status changed from New to Resolved

Fixed in v3.6.10

Also available in: Atom PDF