How to Handle jpython json.dumps Annotation Data Type Correctly? or What’s the Best Way to Annotate D

16 Replies, 861 Views

"Struggling with jpython json.dumps annotation data type – any tips?"

Hey folks,

So I’m messing around with jpython json.dumps and keep hitting snags with annotation data types. Like, my custom classes just won’t serialize right, and the errors are *vague*.

Anyone else run into this?

Is there a trick to make jpython json.dumps play nice with annotated types? Or do I gotta write a custom encoder every time?

Also, does jpython json.dumps even *support* custom annotation data types outta the box? Or am I doomed to workarounds?

Appreciate any hints—thanks!

(PS: If this has been asked before, sorry! My search-fu is weak today.)

Messages In This Thread
How to Handle jpython json.dumps Annotation Data Type Correctly? or What’s the Best Way to Annotate D - by - 13-06-2024, 07:17 PM



Users browsing this thread: 1 Guest(s)