khrt / Raisin

Raisin - a REST API micro framework for Perl 🐫 🐪
61 stars 30 forks source link

Example for how the json encoding could be influenced #33

Closed djzort closed 7 years ago

djzort commented 7 years ago

This is a small example of how the json encoding could be influenced by the developer using Raisin.

Its probably too specific to JSON encoding, perhaps a method called encoder or something could be provided which always returns the object?

khrt commented 7 years ago

I would recommend to create a your own encoder in case you need specific settings. See https://metacpan.org/pod/Raisin::Encoder, and https://metacpan.org/pod/Raisin::Encoder::JSON