Task: Determine Whether JSON is a JSONObject or JSONArray
Task: Determine Whether JSON is a JSONObject or JSONArray: a task in Terminal-Lego-15k (Harbor dataset). You receive JSON data from a server, but you don't know in advance whether the response will be a JSON Object ( {} ) or a JSON Array ( ). Your task is to write a program that reads JSON strings…
The task
You receive JSON data from a server, but you don't know in advance whether the response will be a JSON Object (`{}`) or a JSON Array (`[]`). Your task is to write a program that reads JSON strings and correctly classifies each one as either `"JSONObject"`, `"JSONArray"`, or `"InvalidJSON"`.
Part of PrimeIntellect/Terminal-Lego-15k.