Closed chris-cheshire closed 5 years ago
Not to be mean, but that's a pretty bad issue report. I have no context at all. lol Gonna need a little more information than that.
Sorry dude, new to posting public issues - I was simply trying to search for a type id through the client and this is the JSON error being returned internally, look like the API is returning an engineering "1e35" number that the JSON parser cannot turn into a number.
If you use the ESI manual online tool I can see that it is attribute 4 which is the issue - shown in the screenshot below
That's all the information I have...
When I say search for a type id, I mean using Universe.Type
what is the typeid so i can try to replicate it?
18, its in the subject
oh lol my bad. all i saw was the name for some reason
looks like an ESI bug to me.
Well, 1e+35 is 1 with 35 zero's, it looks like NewtonSoft JSON isnt even seeing it as a number though. In any case, this is beyond the limit for a decimal number so is indeed an error from ESI as well.
So theres 3 problems:
1 - the number is erroneous 2 - the number isnt being recognised as a number at parse time by Newtonsoft.JSON 3 - the number is too big for decimal
Not sure what the answer is...
they'll have to fix it i guess...lol and until then, it can't be cast into a decimal property. The only way for ESI.NET to handle it would be to have a property that can handle the value. Off the top of my head, I'm not sure what the best option is.
I reported it on the ESI bug board https://github.com/esi/esi-issues/issues/1096
{Newtonsoft.Json.JsonReaderException: Input string '1e35' is not a valid decimal. Path 'dogma_attributes[3].value', line 1, position 464. at Newtonsoft.Json.JsonTextReader.ParseReadNumber(ReadType readType, Char firstChar, Int32 initialPosition) at Newtonsoft.Json.JsonTextReader.ReadNumberValue(ReadType readType) at Newtonsoft.Json.JsonTextReader.ReadAsDecimal() at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) at ESI.NET.EsiResponse`1..ctor(HttpResponseMessage response, String path, String version)}