question

zachwalkergames-6669 avatar image
0 Votes"
zachwalkergames-6669 asked YutongTie-MSFT edited

JsonSerializationException when called CustomVisionPredictionClient.DetectImage

Hello! Currently trying to build a UWP app for Hololens in Unity. I'm getting a JsonSerializationException on the Hololens when calling this code
ImagePrediction result = CustomVisionPredictionClient.DetectImage(projectID, modelName, testImage);


I have all the dependencies installed, except my NewtonSoft.Json package is version 12.X, instead of the recommended 10.X. Because of this, I have disabled "Assembly Version Validation" in the Unity PlayerSettings. Anyone know why this error might be thrown, is it the package version?

windows-uwphololens-developmentdotnet-package-management
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@zachwalkergames-6669 I do not have any experience with hololens or unity development but I have found this step in the tutorial that talks about setting up the package for custom vision on hololens.
Could you please check if this helps if not performed already?

Hope, other experts with prior experience on this platform could chip in with their thoughts.


0 Votes 0 ·

0 Answers