# Class Document

Class which represents a JSON Patch document, which represents an array of objects. Each object represents a single operation to be applied to the target JSON document. See RFC 6902 for details.

Namespace: OpenCloud\Image\Resource\JsonPatch
Package: OpenCloud\Images\Resource\JsonPatch
See: http://tools.ietf.org/html/rfc6902
Located at OpenCloud/Image/Resource/JsonPatch/Document.php

Methods summary
`public array` | # `getOperations( )` #### Returns `array`
`public` | # `addOperation( `OpenCloud\Image\Resource\JsonPatch\Operation` $operation )` Add a new JSON operation to the document Add a new JSON operation to the document #### Parameters $operation ``OpenCloud\Image\Resource\JsonPatch\Operation`` $operation
`public string` | # `getResponseBody( )` Encode all the operations into a flat structure for HTTP transfer Encode all the operations into a flat structure for HTTP transfer #### Returns `string`
`protected` | # `validateOperations( )` Ensure each operation is valid Ensure each operation is valid
`public string` | # `toString( )` Cast this document as a string Cast this document as a string #### Returns `string`

Properties summary
`protected array` | $operations | `` | # JSON Patch operations JSON Patch operations