Provides generic JSON views
This modules defines several basic views for serializing
data to JSON. Submodels that have already been serialized
as JSON may have their string values marked with __is_json__
= True using oslo_reports._utils.StringWithAttrs
(each of the classes within this module does this automatically,
and non-naive serializers check for this attribute and handle
such strings specially)
Bases: object
A Basic Key-Value JSON View
This view performs a naive serialization of a model
into JSON by simply calling json.dumps()
on the model
Bases: object
A Key-Value JSON View
This view performs advanced serialization to a model
into JSON. It does so by first checking all values to
see if they are marked as JSON. If so, they are deserialized
using json.loads()
. Then, the copy of the model with all
JSON deserialized is reserialized into proper nested JSON using
json.dumps()
.
Provides basic JSON views
This module provides several basic views which serialize models into JSON.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.