RosettaCodeData/Task/JSON/ANT/json.ant

2 lines
207 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
json:{[data]catch[eval[,|{[y]catch[{":" = "="; "[" = "<"; "]" = ">"; "," = ";"}[y];{x};{[]y}]}'("""("(\\.|[^\\"])*"|\-?[0-9]+(\.[0-9]+)?|\{|\}|\[|\]|\:|\,)"""~data)["strings"]];{x};{error["Invalid JSON"]}]}