DiagnosticInfo values shall be encoded as a JSON object with the fields shown in Table 37.
Table 37 – JSON Object Definition for a DiagnosticInfo
Name |
Data Type |
Description |
SymbolicId |
Int32 |
A symbolic name for the status code. The default value is -1. It is not encoded if the value is -1. |
NamespaceUri |
Int32 |
A namespace that qualifies the symbolic id. The default value is -1. It is not encoded if the value is -1. |
Locale |
Int32 |
The locale used for the localized text. The default value is -1. It is not encoded if the value is -1. |
LocalizedText |
Int32 |
A human readable summary of the status code. The default value is -1. It is not encoded if the value is -1. |
AdditionalInfo |
String |
Detailed application specific diagnostic information. The default value is null. It is not encoded if the value is null. |
InnerStatusCode |
StatusCode |
A status code provided by an underlying system. The default value is Good. It is not encoded if the value is Good. |
InnerDiagnosticInfo |
DiagnosticInfo |
Diagnostic info associated with the inner status code. The default value is null. It is not encoded if the value is null. |
The SymbolicId, NamespaceUri, Locale and LocalizedText fields are encoded as JSON numbers which reference the StringTable contained in the ResponseHeader.
DiagnosticInfo is recursive and unlimited recursion could result in stack overflow errors even if the message size is less than the maximum allowed. Decoders shall support at least 4 recursion levels and are not expected to support more than 10. Decoders shall report an error if the number of recursion levels exceeds what it supports.