Translate table data form one language to another

It says that it can’t find any class called JsonArray. I’m guessing that you want to use System.Text.Json.Nodes.JsonArray class. If so, you must either use the full name or add using System.Text.Json.Nodes;.

Please read the error message to learn which class you need to use for content headers.


Url seems to be not accessible.

Hi Martin,
I need your help to parse the JSON to get the text value “Hello”
str jsonResponse = ‘[{“translations”:[{“text”:“hello”,“to”:“en”}]}]’;

“JsonArray jsonArray = JsonArray::Parse(jsonResponse);
JsonObject jsonObject = jsonArray.Get(0).Get(“translations”).Get(0);
translatedText = jsonObject.Get(“text”).GetString();”

Compile error :get(system.int) is not supported -

Hi Martin,
I tried out using multiple options to read the value but no luck. I have an alternate option to use the strfind() and get the value but looking for the optimal way.

The topic has changed significantly from Translate table data form one language to another. Please create a new thread for problem with JSON parsing and let’s discuss it there.
It’ll help to keep things structured; it’ll also help other users who may be looking for something about JSON parsing and wouldn’t have idea to look into this thread.

no Martin, it’s the same topic only. At the end, I’m trying the get the translated text value

No, it’s translating table data and parsing a JSON string isn’t the same topic. I understand it’s related in your particular case, but putting everything in the same thread is a mistake.

It’s the same as with development. That you’re developing a particular feature doesn’t mean that you’ll create a single method doing everything. You’ll split it to smaller pieces (classes and methods), each with its own name and purpose, won’t you?

The discussion about JSON parsing continues in Parse json using x++ without contract classes.