module Roda::RodaPlugins::JsonParser

The json_parser plugin parses request bodies in JSON format if the request’s content type specifies json. This is mostly designed for use with JSON API sites.

This only parses the request body as JSON if the Content-Type header for the request includes “json”.

The parsed JSON body will be available in r.POST, just as a parsed HTML form body would be. It will also be available in r.params (which merges r.GET with r.POST).