src/Azos/CodeAnalysis/JSON/JsonIdentifiers.cs
/// <summary>
/// Checks whether supplied string is a valid JSON grammar identifier
/// </summary>
Checks whether supplied string is a valid JSON grammar identifier
Checks whether supplied string is a valid JSON grammar identifier
public static bool Validate(string id)
    {
      if (id==null) return false;
      if (id.Length < 1) return false;
      if (!ValidateChar(id[0])) return false;
      for (int i = 1; i < id.Length; i++)
      {
        if (! (ValidateChar(id[i]) || ValidateDigit(id[i]))) return false;
      }
      return true;
    }
public static bool Validate ( string id ) { if ( id == null ) return false ; if ( id . Length < 1 ) return false ; if ( ! ValidateChar ( id [ 0 ] ) ) return false ; for ( int i = 1 ; i < id . Length ; i ++ ) { if ( ! ( ValidateChar ( id [ i ] ) || ValidateDigit ( id [ i ] ) ) ) return false ; } return true ; }
Checks whether supplied string is a valid JSON grammar identifier
Checks whether supplied string is a valid JSON grammar identifier
id
string