Reputation: 35
Upvotes: 0
Views: 1854
Reputation: 3022
It looks like the json library you reference supported writing json: https://github.com/nlohmann/json. There are examples of using the .dumps()
method to output json.
I assume you want to update the DOM based on code running WebAssembly? The only want to effect the DOM from WebAssembly is call out to JS, or have JS call into wasm. For example you could have a setTimeout
in JS that calls a WebAssembly function every second to retrieve some new state, and then use that to update the DOM.
Upvotes: 1