code: def str2type(value):
      
      if not isinstance(value, str):
          return value
      try:
          return json.loads(value)
      except JSONDecodeError:
          return value
docs: Take a string and convert it to a value of proper type.
  
  
          .. testsetup::
  
              from proso.coversion import str2type
  
          .. doctest::
  
              >>> print(str2type("[1, 2, 3]")
              [1, 2, 3]