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

Custom JSON encoders for js bridge call #1339

Closed
XcantloadX opened this issue Mar 25, 2024 · 5 comments
Closed

Custom JSON encoders for js bridge call #1339

XcantloadX opened this issue Mar 25, 2024 · 5 comments
Labels

Comments

@XcantloadX
Copy link

Specification

  • pywebview version: 4.4.1
  • operating system: Windows 11
  • web renderer: Webview2

Description

Custom JSON encoders will be helpful if you want to return a namedtuple or dataclass object.

Practicalities

  • YES I am willing to work on this issue myself.

  • NO I am prepared to support this issue financially.

@r0x0r
Copy link
Owner

r0x0r commented Mar 26, 2024

Replacing json.dumps with orjson.dumps seems like a straightforward solution.

@ylm-king
Copy link

That's a good idea. There are many libraries that perform faster than json, and I myself have given up using json and replaced it with ujson or something else

@r0x0r
Copy link
Owner

r0x0r commented Apr 14, 2024

I ran into a problem with orjson. There is no recipe for p4a, so it cannot be used on Android. There is an issue about adding a recipe in the p4a repo kivy/python-for-android#3001
Let's wait until the support is added.

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label May 15, 2024
Copy link

The message to post on the issue when closing it. If none provided, will not comment when closing an issue.

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

No branches or pull requests

3 participants