Skip to content

Commit

Permalink
Reintroduced parse_object as obsolete, to avoid breaking existing code.
Browse files Browse the repository at this point in the history
  • Loading branch information
jocelyn committed Nov 17, 2014
1 parent 641e114 commit 17680ba
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions library/parser/json_parser.e
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
note
description: "Parse serialized JSON data"
author: "$Author$"
date: "$Date$"
revision: "$Revision$"
author: "$Author: jfiat $"
date: "$Date: 2014-11-17 11:54:05 +0100 (lun., 17 nov. 2014) $"
revision: "$Revision: 96099 $"

class
JSON_PARSER
Expand Down Expand Up @@ -166,6 +166,18 @@ feature -- Obsolete commands
end
end

parse_object: detachable JSON_OBJECT
-- Parse JSON data `representation'
-- start ::= object | array
obsolete
"Use `parse_content' and `parsed_json_value' [nov/2014]."
do
parse_content
if is_parsed and then attached {JSON_OBJECT} parsed_json_value as jo then
Result := jo
end
end

parse: detachable JSON_VALUE
-- Next JSON value from current position on `representation'.
obsolete
Expand Down Expand Up @@ -197,7 +209,7 @@ feature {NONE} -- Implementation: parsing
c := actual
inspect c
when token_object_open then
Result := parse_object
Result := next_json_object
when token_double_quote then
Result := parse_string
when token_array_open then
Expand Down Expand Up @@ -231,7 +243,7 @@ feature {NONE} -- Implementation: parsing
is_parsed_implies_result_not_void: not has_error implies Result /= Void
end

parse_object: JSON_OBJECT
next_json_object: JSON_OBJECT
-- object
-- {}
-- {"key" : "value" [,]}
Expand Down

0 comments on commit 17680ba

Please sign in to comment.