code: def input_json(i):
      
  
  
      t=i['text']
  
      out(t)
  
      s=''
  
      while True:
         r=inp({'text':''})
         if r['return']>0: return r
         ss=r['string'].strip()
         if ss=='': break
         s+=ss
  
      s=s.strip()
  
      if s=='': s='{}' # empty json
      else:
         if not s.startswith('{'): s='{'+s
         if not s.endswith('}'): s+='}'
  
      r=convert_json_str_to_dict({'str':s, 'skip_quote_replacement':'yes'})
      if r['return']>0: return r
  
      d=r['dict']
  
      return {'return':0, 'string': s, 'dict':d}
docs: Input:  {
                text - text to print
              }
  
      Output: {
                return              - return code =  0, if successful
                                                  >  0, if error
                (error)             - error text if return > 0
  
                string
                dict                - parsed JSON
              }