mirumee / prices

Python price handling for humans.
Other
268 stars 39 forks source link

Add to_json method #11

Open mociepka opened 9 years ago

mociepka commented 9 years ago

It would be nice to have to_json method or to_dict or json serializer in prices. Now I use:

price = {name: str(value) for name, value in obj._asdict().items()}
del price['history']

but this doesn't look good.

patrys commented 9 years ago

I'd much rather finish implementing my idea that turns a Price into two Amounts.

pcompassion commented 8 years ago

+1 could serialize price during checkout process for instance and use it.