Skip to content

How to Convert JSON Back to AST Tree in Rust? #4727

Answered by arendjr
shahryarjb asked this question in Q&A
Discussion options

You must be logged in to vote

I have a tiny bit of experience with Rustler, and I think you’re right: converting to JSON is probably your best bet.

The problem is that deserializing (whether it’s from JSON or something else) is quite a complex operation, given the data structures involved, and is indeed almost as difficult as implementing a custom parser, minus the syntax bits.

So you understand why we haven’t implemented this :)

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@shahryarjb
Comment options

@ematipico
Comment options

@shahryarjb
Comment options

@arendjr
Comment options

Answer selected by shahryarjb
@shahryarjb
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants