code: def _ToJsonName(name):
    
    capitalize_next = False
    result = []
  
    for c in name:
      if c == '_':
        capitalize_next = True
      elif capitalize_next:
        result.append(c.upper())
        capitalize_next = False
      else:
        result += c
  
    return ''.join(result)
docs: Converts name to Json name and returns it.