Fixed various issue with parsing string (such as \t and related),

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.
This commit is contained in:
2014-09-24 20:08:12 +02:00
parent de282948e6
commit 19dbbf89e7
40 changed files with 1121 additions and 788 deletions
@@ -60,7 +60,7 @@ feature -- Conversion
to_json (o: like object): JSON_OBJECT
do
create Result.make
create Result.make_with_capacity (2)
Result.put (json.value (o.name), name_key)
Result.put (json.value (o.books), books_key)
end
@@ -70,13 +70,13 @@ feature {NONE} -- Implementation
name_key: JSON_STRING
-- Collection's name label.
once
create Result.make_json ("name")
create Result.make_from_string ("name")
end
books_key: JSON_STRING
-- Book list label.
once
create Result.make_json ("books")
create Result.make_from_string ("books")
end
end -- class JSON_BOOK_COLLECTION_CONVERTER