proofgeist/fm-json-additions

JSON.IsValid can be faked out to return False for valid JSON

Opened this issue · 0 comments

This is not a particularly likely scenario, but a JSON object can be built that wrongly returns False for valid JSON.
{"doesnotmatterwhatishere":"? * DELIBERATELY FAKING OUT THE TEST"}
A solution is to use the validity-test recommendation given by Claris: run JSONFormatElements on the object and make sure the 1st character of that is not a question mark.
Sample fix JSONAdditions.fmp12 database attached.
JSONAdditions-IsValid-faked-out-FIXED.fmp12.zip