Open
Description
many JSON looks like this:
{"num":"123","str":"hello"}
Number can be in quotes too
JsonElement.GetInt64() throws Exception that "we need Number but we have a String".
I am sure that in quotes we have a Number, so code (GetInt64 and others) should ignore quotes and try parse number. and only in case when cannot parse Number(invalid chars) throw some Exception
UPD
Oops! I used unclear title. better
..JsonElement should parse Numbers in qoutes
SUMMATION:
- GetInt64() and etc should parse Numbers(long,uint,decimal..) for String elements: ignore first and last quotes.
- add .AsSpan() method to JsonElement for cases when we want to do something with elements manually. we cannot access to element data and do something useful or work around with some problem (.GetString(), .ToString(), .GetRawString() - stress GC and they are not solution)