cancel
Showing results for 
Search instead for 
Did you mean: 

Neo4j kernel 4.0-aura seems to break handling of nulls in apoc.convert.toJson

oudrea
Node

For an Aura DB currently running '4.0-aura',

return apoc.convert.toJson({a:null}) as json_record_str;

throws an error, whereas it used to work perfectly before. This affects any JSON conversion for any object where there is a null value for any property. Per the JSON spec, null is a valid value: JSON

4 REPLIES 4

giuseppe_villan
Graph Fellow

@oudrea

Can you provide the apoc version, just execute RETURN apoc.version().
This bug should have been fixed been fixed in all 4.x versions, except 4.4

apoc.version() returns 4.4. Note I can't control the apoc version installed on Neo4J Aura, so all Aura users will be affected until either Apoc is rolled back or this is fixed in 4.4.

Thanks!

wgroves
Node

@giuseppe.villani

Now the apoc version is different on our instance.

RETURN apoc.version();

"4.4.0.1"

But the error is still present:

return apoc.convert.toJson({a:null}) as json_record_str;

Neo.ClientError.Procedure.ProcedureCallFailed
Failed to invoke function apoc.convert.toJson: Caused by: java.lang.NullPointerException

Yep, I meant 4.4.x.x, so until now the bug is still present in all 4.4 subversions.