code: func (term *Term) MarshalJSON() ([]byte, error) {
  	d := map[string]interface{}{
  		"type":  TypeName(term.Value),
  		"value": term.Value,
  	}
  	return json.Marshal(d)
  }
docs: // MarshalJSON returns the JSON encoding of the term.
  //
  // Specialized marshalling logic is required to include a type hint for Value.