original_string: protected function parseProxyData( & $data )
      {
          if ( empty( $data ) )
          {
              return array();
          }
  
          $result = array();
          foreach ( json_decode( $data, true ) as $field )
          {
              if ( empty( $field['name'] ) )
              {
                  continue;
              }
  
              $name   = (string) $field['name'];
              $parts  = explode( '.', $name, 2 );
              $value  = isset( $field['value'] ) ? $field['value'] : null;
  
              if ( count( $parts ) > 1 )
              {
                  list( $name, $sub ) = $parts;
  
                  if ( isset( $result[$name] ) )
                  {
                      if ( ! is_array( $result[$name] ) )
                      {
                          $result[$name] = (array) $result[$name];
                      }
                  }
                  else
                  {
                      $result[$name] = array();
                  }
  
                  $result[$name][$sub] = $value;
              }
              else
              {
                  $result[$name] = $value;
              }
          }
  
          foreach ( $result as & $value )
          {
              if ( is_array( $value ) )
              {
                  uksort( $value, 'strnatcmp' );
              }
          }
  
          return $result;
      }
code: protected function parseProxyData( & $data )
      {
          if ( empty( $data ) )
          {
              return array();
          }
  
          $result = array();
          foreach ( json_decode( $data, true ) as $field )
          {
              if ( empty( $field['name'] ) )
              {
                  continue;
              }
  
              $name   = (string) $field['name'];
              $parts  = explode( '.', $name, 2 );
              $value  = isset( $field['value'] ) ? $field['value'] : null;
  
              if ( count( $parts ) > 1 )
              {
                  list( $name, $sub ) = $parts;
  
                  if ( isset( $result[$name] ) )
                  {
                      if ( ! is_array( $result[$name] ) )
                      {
                          $result[$name] = (array) $result[$name];
                      }
                  }
                  else
                  {
                      $result[$name] = array();
                  }
  
                  $result[$name][$sub] = $value;
              }
              else
              {
                  $result[$name] = $value;
              }
          }
  
          foreach ( $result as & $value )
          {
              if ( is_array( $value ) )
              {
                  uksort( $value, 'strnatcmp' );
              }
          }
  
          return $result;
      }
code_tokens: protected function parseProxyData ( & $ data ) { if ( empty ( $ data ) ) { return array ( ) ; } $ result = array ( ) ; foreach ( json_decode ( $ data , true ) as $ field ) { if ( empty ( $ field [ 'name' ] ) ) { continue ; } $ name = ( string ) $ field [ 'name' ] ; $ parts = explode ( '.' , $ name , 2 ) ; $ value = isset ( $ field [ 'value' ] ) ? $ field [ 'value' ] : null ; if ( count ( $ parts ) > 1 ) { list ( $ name , $ sub ) = $ parts ; if ( isset ( $ result [ $ name ] ) ) { if ( ! is_array ( $ result [ $ name ] ) ) { $ result [ $ name ] = ( array ) $ result [ $ name ] ; } } else { $ result [ $ name ] = array ( ) ; } $ result [ $ name ] [ $ sub ] = $ value ; } else { $ result [ $ name ] = $ value ; } } foreach ( $ result as & $ value ) { if ( is_array ( $ value ) ) { uksort ( $ value , 'strnatcmp' ) ; } } return $ result ; }
docstring: Parse proxy-data
  
  Like:
  <pre>
  &lt;struct&gt;
  [{"name":"{key}","value":"{value}"}]
  &nbsp;...
  &lt;/struct&gt;
  </pre>
  
  @param string $data
  @return array
docstring_tokens: Parse proxy - data