Share via


2.2.5.1.2 CSOM Binary JSON Value

If a CSOM binary value is used in response JSON text, it is a JSON string and it MUST conform to the following format:

 csom-binary-json-value  = rfc4627-quotation-mark csom-binary-prefix 
                           base64String csom-binary-suffix rfc4627-quotation-mark
 csom-binary-prefix      = %x5C.2F.42.61.73.65.36.34.42.69.6E.61.72.79.28 
                           ; "\/Base64Binary("
 csom-binary-suffix      = %x29.5C.2F  ; ")\/"
 base64String            = *base64Char
 base64Char              = ALPHA / DIGIT / plus / solidus / pad
 plus                    = "+"
 solidus                  = "\u002f" / "\u002F"
 pad                     = "="

The base64String is obtained by replacing the character solidus "‘/’ (U+002F)" in the base64 encoding result of the byte array with "\u002f" or "\u002F". For example, if a binary is of length 4, the first byte is "61", the second byte is "62", the third byte is "63", the fourth byte is "64", and the base64 encoding result is:

 PT4/QA==

The base64String is either:

 PT4\u002fQA==

Or:

 PT4\u002FQA==

For example, if a binary is of length 4, the first byte is "61", the second byte is "62", the third byte is "63", and the fourth byte is "64", then the CSOM binary JSON value is specified as either:

 "\/Base64Binary(PT4\u002fQA==)\/"

Or:

 "\/Base64Binary(PT4\u002FQA==)\/"