code: func FromJSON(buf []byte) (*Graph, error) {
  
  	var v interface{}
  
  	// Use Decoder, since we want to treat integers as integers.
  	dec := json.NewDecoder(bytes.NewReader(buf))
  	dec.UseNumber()
  
  	// We expect here only one map or list
  	err := dec.Decode(&v)
  	if err != nil {
  		return nil, err
  	}
  
  	return toGraph(v).GetAt(0), nil
  }
docs: // FromJSON converts a JSON text stream into OGDL.
  //
  // Json types returned by Decode/Unmarshall:
  // - bool, for JSON booleans
  // - int64 / float64, for JSON numbers
  // - string, for JSON strings
  // - []interface{}, for JSON arrays
  // - map[string]interface{}, for JSON objects
  // - nil for JSON null
  //
  // TODO I'm not sure about not giving lists a root node, but we need to avoid both
  // useless nesting and also post-simplification (and its unwanted side effects).
  // But, for example [ "a", [ "b", "c" ] ] will be returned as:
  //     a
  //     b
  //     c
  //