JsonToDelphi
JsonToDelphi copied to clipboard
How to hide TJsonOptions
if i request AsJson from class, then i will get json response with TJsonOption. how to remove it?
{ "id": "6", "data": "Test" "options": [ "joDateIsUTC", "joDateFormatISO8601" ] }
+1 on this. Novice with the classes, used once, got this tagged on the end, hand built other results due to this.
need send json to client server which should not have any fields other than those specified. so currently I am using this method.
var JSONObject: TJSONObject; begin JSONObject := TJSONObject.ParseJSONValue(JSonString) as TJSONObject; try JSONObject.RemovePair('options'); Result := JSONObject.ToString; finally JSONObject.Free; end; end;
@megatkurniawan if you are facing this issue in delphi 12 then this is the solution