# jsonString Source: https://www.nianticspatial.com/docs/api/swift/NSDK.Nsdk_Vps_VpsSegmentTarget.method-jsonString/ jsonString --- ## Declaration func jsonString(options: JSONEncodingOptions = JSONEncodingOptions()) throws -> String #### Summary Returns a string containing the JSON serialization of the message. Unlike binary encoding, presence of required fields is not enforced when serializing to JSON. #### Returns A string containing the JSON serialization of the message. #### Throws SwiftProtobufError or JSONEncodingError if encoding fails. ### Parameters | Name | Type | Summary | | --- | --- | --- | | options | JSONEncodingOptions | The JSONEncodingOptions to use. | --- ## Overload static func jsonString(from collection: C, options: JSONEncodingOptions = JSONEncodingOptions()) throws -> String where Self == C.Element, C : Collection #### Summary Returns a string containing the JSON serialization of the messages. Unlike binary encoding, presence of required fields is not enforced when serializing to JSON. #### Returns A string containing the JSON serialization of the messages. #### Throws SwiftProtobufError or JSONEncodingError if encoding fails. ### Parameters | Name | Type | Summary | | --- | --- | --- | | options | JSONEncodingOptions | The JSONEncodingOptions to use. | ---