Closed oneonce closed 6 years ago
JsonReader.cs
private void ReadHexNum(StringBuilder builder) { while (this.scanner.CanRead && char.IsLetterOrDigit(this.scanner.Peek())) { builder.Append(this.scanner.Read()); } }
private JsonValue ReadNumber() { .... if (this.scanner.CanRead && char.ToLowerInvariant(this.scanner.Peek()) == 'e') { ... }
if (this.scanner.CanRead && char.ToLowerInvariant(this.scanner.Peek()) == 'x') { char ch = this.scanner.Read(); builder.Clear(); ReadHexNum(builder); if (8 >= builder.Length) { return Convert.ToUInt32(builder.ToString(), 16); } else if (16 >= builder.Length) { return Convert.ToUInt64(builder.ToString(), 16); } else // Convert to JsonArray? or not support? { //JsonArray ja = new JsonArray(); } }
... }
@oneonce What is this?
I suggest "LightJson" should support read Hexadecimal number from document/string;
I think this is something better left for the client code to do.
JsonReader.cs
private JsonValue ReadNumber() { .... if (this.scanner.CanRead && char.ToLowerInvariant(this.scanner.Peek()) == 'e') { ... }
... }