GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SNOBOL4JSON(3) CSNOBOL4 Manual SNOBOL4JSON(3)

JSON Encoding and Decoding


-INCLUDE 'json.sno'
      string = JSON_ENCODE(data)
      data = JSON_DECODE(string)

JSON_ENCODE(data) accepts a subset of SNOBOL4 data types:
  • STRING
  • INTEGER
  • REAL
  • ARRAY MUST be singly-dimensioned and zero-based.
  • TABLE

JSON_DECODE(json_string) accepts a proper subset of JSON with the following limits and omissions:

  • arrays must have at least one item.
  • escapes can only be used for ASCII (00-7F) characters.
  • true and false are not accepted.

NOTE!!! JSON is defined to use UTF-8 encoding, but this is not enforced by this library. To exchange binary data with other software which may enforce use of only UTF-8 sequences, the binary strings should be encoded (eg with base64) to ASCII sequences.

https://tools.ietf.org/html/rfc8259

snobol4(1), snobol4base64(3)

Philip L. Budne
March 31, 2022 CSNOBOL4B 2.3.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.