How to Convert JSON to Dictionary in GDNative C++

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Nix Jian

—The question was solved—

In GDNative, I can convert a dictionary to a JSON, but how do I convert a JSON string to a dictionary?

The solution

Dictionary destination = JSON::get_singleton()->parse(file->get_as_text())->get_result();

The C++ compiler will automatically convert it into dictionary.