Bean populator errors on null values in JSON string

Description

when trying to use null values in a json string, populateFromJSON fails

myJson='{"Id":1,"Name":"SomeName","Description":null}';
orm.populatefromJson(myObj,myJson);

This can easily be solved by deserializing to a Struct. This will work fine. Afterward you need checking for null values in struct keys. Since Coldfusion fails on IsNull(mystruct[NullKey)) you have to check for structKeyExists(mystruct, key) in populateFromStruct which will work on both CF and Lucee.

Fixed

Assignee

Luis Majano

Reporter

Wil de Bruin

Labels

None

Components

Fix versions

Priority

Major
Configure