Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Lazify objects can't be json_encode'd #15

Closed
trubesv opened this issue Apr 13, 2018 · 2 comments
Closed

Lazify objects can't be json_encode'd #15

trubesv opened this issue Apr 13, 2018 · 2 comments

Comments

@trubesv
Copy link
Contributor

trubesv commented Apr 13, 2018

No description provided.

@trubesv trubesv closed this as completed Apr 13, 2018
@trubesv trubesv reopened this Apr 13, 2018
@trubesv trubesv changed the title Lazify objects can't be json_encode'd Lazify objects can't be json_encode'd Apr 13, 2018
@ramnes
Copy link
Collaborator

ramnes commented Apr 13, 2018

Whut?

Do you have a test case?

@ramnes
Copy link
Collaborator

ramnes commented Apr 16, 2018

This is an issue related to Lazify and Flask, not Flask-Stupe. See Refty/lazify#4.

That being said, Flask-Stupe makes it easy to work around this problem:

app.json_encoder.add_rule(LazyProxy, lambda p: p.value)

@ramnes ramnes closed this as completed Apr 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants