I am working with Document Understanding and it has a ‘DocumentProcessing.Contracts.Results.ClassificationResult’ object, which I need to Serialize and Deserialziar as json, xml or text.
Within assign activity a get the Json with ‘JsonConvert.SerializeObject()’ and serialization works great
With ‘JsonConvert.DeserializeObject<T>’ the deserialization works great in .Net, but not in UiPath Studio.
Apparently the validation does not understand the class typified in or <T> (array) and indicates an invalid ‘end of expresion expected’.
Using the Deserialize json activity returns a JArray, it returns a json but I can’t deserialize and instance of ‘ClassificationResult’ from there.
Using the Invoke Method is a solution, but it is not clear to me how to initiate it to ‘cast’ <T>.
Someone with a solution proposal that allows deserialziar tified objects from a json with ‘JsonConvert.DeserializeObject <T>’?
Finally the DirectCast does not work because the class ‘ClassificationResult’ does not have the ‘ornaments’ associated with classes that are serialized and deserialized.