You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You could either use the Get function that gives you back data and type
in PR #214 I've added a GuessJSONType function that returns the type of data coming next in the buffer just in case
Closing as answered — Get(data) with no keys returns the root value and its ValueType. For example: _, vt, _, _ := jsonparser.Get(data); fmt.Println(vt) prints Object, Array, String, Number, Boolean, or Null.
Activity
stephane-moreau commentedon Oct 13, 2020
You could either use the Get function that gives you back data and type
in PR #214 I've added a GuessJSONType function that returns the type of data coming next in the buffer just in case
buger commentedon Jul 28, 2026
Closing as answered —
Get(data)with no keys returns the root value and its ValueType. For example:_, vt, _, _ := jsonparser.Get(data); fmt.Println(vt)prints Object, Array, String, Number, Boolean, or Null.