title: How to determine the type of json object in go
body: <p>In <a href="https://gobyexample.com/json" rel="nofollow noreferrer">gobyexample.com/json</a>, a few examples show how to decode <code>json</code> string into typed objects or dictionary objects, which are declared as <code>map[string]interface{}</code>. But it assumes the result is always a dictionary. </p>
  
  <p>So my question is how to determine the type of <code>json</code> object and what is the best practice to handle that?</p>