title: convert string to json in golang and vice versa?
body: <p>In my app, I receive a json from the client. This json can be anything since the user defines the keys and the values. In the backend I store it as string in the datastore.</p>
  
  <p>Now i'm trying to override the MarshalJson / UnmarshalJson functions so that what I send / receive from the client is not a string but a json. </p>
  
  <p>I can't figure out how to convert a string to json in go.</p>
  
  <p>my structure</p>
  
  <pre><code>type ContextData string
  type Iot struct {
  Id              IotId       `json:"id,string" datastore:"-" goon:"id"`
  Name            string   `json:"name"`
  Context         ContextData  `json:"context" datastore:",noindex"` }
  </code></pre>
  
  <p>example of received data</p>
  
  <pre><code>{ 'id' : '',
    'name' '',
    'context': {
             'key1': value1,
             'key2': value2 }}
  </code></pre>
  
  <p>how i want to store this Context field in the datastore as a noindex string <code>'{'key1':value1, 'key2':value2}'</code>
  example of data i want to send</p>
  
  <pre><code>{ 'id' : '',
    'name' '',
    'context': {
             'key1': value1,
             'key2': value2 }}
  </code></pre>