We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When trying to use a Json file served by a url I am getting the error
JsonException: Invalid character '' in input string it happens when I use this method:
JsonException: Invalid character '' in input string
IEnumerator GetText() { UnityWebRequest webjson = UnityWebRequest.Get("http://awebsite.com/Art_.json"); yield return webjson.SendWebRequest(); if (webjson.isNetworkError || webjson.isHttpError) { Debug.Log(webjson.error); } else { // The following line is giving me the error: // ItemDatabase_+<GetText>d__3.MoveNext () (at Assets/Version2.0/Scripts/ItemDatabase_.cs:38) itemData = JsonMapper.ToObject(webjson.downloadHandler.text); Debug.Log(itemData); ConstructItemDatabase(); } }
I have tried to use Trim()
Trim()
itemData = JsonMapper.ToObject(webjson.downloadHandler.text.Trim()); But still have the same result.
itemData = JsonMapper.ToObject(webjson.downloadHandler.text.Trim());
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When trying to use a Json file served by a url I am getting the error
JsonException: Invalid character '' in input string
it happens when I use this method:
I have tried to use
Trim()
itemData = JsonMapper.ToObject(webjson.downloadHandler.text.Trim());
But still have the same result.
The text was updated successfully, but these errors were encountered: