Implemented escaping of slash '/' only in case of '</' to avoid potential issue with javascript and </script> Many feature renaming to match Eiffel style and naming convention, kept previous feature as obsolete. Restructured the library to make easy extraction of "converter" classes if needed in the future. Updated part of the code to use new feature names.
33 lines
959 B
Plaintext
33 lines
959 B
Plaintext
note
|
|
description: "[
|
|
Shared factory class for creating JSON objects. Maps JSON
|
|
objects to Gobo DS_HASH_TABLEs and JSON arrays to Gobo
|
|
DS_LINKED_LISTs. Use non-conforming inheritance from this
|
|
class to ensure that your classes share the same
|
|
JSON_FACTORY instance.
|
|
]"
|
|
author: "Paul Cohen"
|
|
date: "$Date$"
|
|
revision: "$Revision$"
|
|
file: "$HeadURL: $"
|
|
|
|
class SHARED_GOBO_EJSON
|
|
|
|
feature
|
|
|
|
json: EJSON
|
|
-- A shared EJSON instance with default converters for
|
|
-- DS_LINKED_LIST [ANY] and DS_HASH_TABLE [ANY, HASHABLE]
|
|
local
|
|
jllc: JSON_DS_LINKED_LIST_CONVERTER
|
|
jhtc: JSON_DS_HASH_TABLE_CONVERTER
|
|
once
|
|
create Result
|
|
create jllc.make
|
|
Result.add_converter (jllc)
|
|
create jhtc.make
|
|
Result.add_converter (jhtc)
|
|
end
|
|
|
|
end -- class SHARED_GOBO_EJSON
|