You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case where I need the json-ast semantic model in memory as a serde_json::Value. JsonWriter computes this Value internally before serializing it out to a json-text representation.
The work-around I'm using is to use JsonWriter to write the model, then use serde_json to read it back in again to construct the Value. If JsonWriter exposed its internal Value available through an api, the in-memory semantic model would be easier to obtain.
One way to implement this would be to expose a new function in the atelier-json crate: pub fn json_ast_model(model: &Model) -> Value
JsonWriter could use this function internally, to avoid duplicating code, and there wouldn't be any api change to JsonWriter.
The text was updated successfully, but these errors were encountered:
I have a use case where I need the json-ast semantic model in memory as a serde_json::Value. JsonWriter computes this Value internally before serializing it out to a json-text representation.
The work-around I'm using is to use JsonWriter to write the model, then use serde_json to read it back in again to construct the Value. If JsonWriter exposed its internal Value available through an api, the in-memory semantic model would be easier to obtain.
One way to implement this would be to expose a new function in the atelier-json crate:
pub fn json_ast_model(model: &Model) -> Value
JsonWriter could use this function internally, to avoid duplicating code, and there wouldn't be any api change to JsonWriter.
The text was updated successfully, but these errors were encountered: