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

[Enhancement request] Ability to expand variables #26

Open
caleb15 opened this issue Sep 18, 2022 · 2 comments
Open

[Enhancement request] Ability to expand variables #26

caleb15 opened this issue Sep 18, 2022 · 2 comments

Comments

@caleb15
Copy link

caleb15 commented Sep 18, 2022

In the call and return from locals there is data that is just presented as text, when ideally it should be presented as a dictionary you can expand to easily see the contents of.

For example, I see stuff like "response": "<HttpResponse status_code=403, \"text/html; charset=utf-8\">". This is fine, where it becomes a problem is longer ones where you have to scroll to the right.

Currently I would classify this as just a minor want.

@Almenon
Copy link

Almenon commented Sep 24, 2022

This is the open-source handle of OP. I'm the maintainer of the AREPL extension, which has some serialization code that could be of interest to you.

I have a similar problem of needing to pass variables from python to Typescript. To solve it I use jsonpickle to serialize (pickle) the objects into JSON. I pass the results to my extension, where I use JSON visualization library renderJson to provide an expandable output. I would actually recommend using a different visualization library or writing your own, however. Renderjson is nice but it's not in Typescript and the last update was in 2018.

The pickler: https://github.com/Almenon/AREPL-backend/blob/master/python/arepl_pickler.py

I would be happy to hop on a call to go over it or AREPL if it's of interest.

@Almenon
Copy link

Almenon commented Sep 24, 2022

Forgot to mention why I use jsonpickle. It's really good at being able to pickle arbitrary objects. For example, one of your users reported a failure with hashid in #33. Jsonpickle is able to handle this just fine.

image

The downside is you have to pickle a lot of variables, so I don't know if jsonpickle would be fast enough for your users.

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