How to serialize JSON key containing dots (like e.g. IP address) with SuperObject?
问题 I'm trying to save JSON where IP is a key. Expected JSON result is: {"SnmpManagers":[{"10.112.25.235":162}]} The Delphi SuperObject code: const IpAddr = '10.112.25.235'; Port = 162; var tmp: TSuperObject; begin tmp := TSuperObject.Create; tmp.I[IpAddr] := Port; Json.A['SnmpManagers'].Add(tmp); end; SuperObject parses dots as path delimiters of a JSON object: {"SnmpManagers":[{"10":{"112":{"25":{"235":162}}}}]} How to save IP as a JSON key correctly with SuperObject ? 回答1: The solution is to