rest_framework_dso.parsers module

Improved input parsing.

This supports the DSO Content-Crs HTTP header, so HTTP POST requests can be parsed with the desired coordinate projection.

class rest_framework_dso.parsers.DSOJsonParser

Bases: JSONParser

Parse incoming JSON requests.

This adds an request.data.crs attribute

parse(stream, media_type=None, parser_context=None)

Parses the incoming bytestream as JSON and returns the resulting data.

renderer_class

alias of HALJSONRenderer

class rest_framework_dso.parsers.GeoDict(data: dict, crs: CRS)

Bases: dict

A wrapper to provide the CRS data to the request.data.

__init__(data: dict, crs: CRS)
class rest_framework_dso.parsers.GeoList(data: list, crs: CRS)

Bases: list

A wrapper to provide the CRS data to the request.data.

__init__(data: list, crs: CRS)