Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a structured/tree data (JSON?) server/viewer #10

Open
kuhnroyal opened this issue Feb 3, 2022 · 6 comments
Open

Add a structured/tree data (JSON?) server/viewer #10

kuhnroyal opened this issue Feb 3, 2022 · 6 comments

Comments

@kuhnroyal
Copy link

After seeing the awesome work you did here, I wonder if there would be a way to inspect Dart/Json (tree-like) object hierarchies.

I am using a form of redux and it would be awesome to inspect the state tree.

@NicolaVerbeeck
Copy link
Owner

What would the leaves look like? Eg: every leaf has a single property or a collection of properties? For pure dart objects there would be need for some kind of serialization/deserialization mechanism given the absence of reflect (at least for flutter).

@kuhnroyal
Copy link
Author

Yea Dart objects are probably not the way to go. Probably a JSON tree structure with basic properties and nested object nodes. This would allow all for kinds of data to be serialized and inspected. Serialization is ofc the responsibility of the implementer.

@NicolaVerbeeck
Copy link
Owner

NicolaVerbeeck commented Feb 6, 2022

I made a suggestion for a tree server in tree_server.dart

I think this should work for json like data. Do you think anything is missing? If not I will start brewing up protocols and the eventual IDE support (though this is may take some time to get right)

@kuhnroyal
Copy link
Author

What about setting the full tree, is TreePath([]) is effectively the root and we could just pass a Map<String, dynamic> as value?

@NicolaVerbeeck
Copy link
Owner

Jep, or anything that is supported. Could be you have a tree with only a root element, or an array as root

@kuhnroyal
Copy link
Author

Sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants