Merge branch 'master' into concurrent_httpd

- Updated JSON parser library
 - Removed obsolete calls on json parser library.
This commit is contained in:
2015-04-08 16:16:04 +02:00
81 changed files with 3970 additions and 2939 deletions

View File

@@ -133,8 +133,9 @@ feature {NONE} -- Initialization
-- Show the Response body
if attached Result.body as m then
create j.make_parser (m)
if j.is_parsed and attached j.parse_object as j_o then
create j.make_with_string (m)
j.parse_content
if j.is_valid and then attached j.parsed_json_object as j_o then
if attached {JSON_STRING} j_o.item ("id") as l_id then
id := l_id.item
end

View File

@@ -97,7 +97,7 @@ feature -- Conversion
Result.put (json.value (o.location), location_key)
Result.put (json.value (o.status), status_key)
from
create ja.make_array
create ja.make_empty
o.items.start
until
o.items.after
@@ -117,48 +117,48 @@ feature -- Conversion
feature {NONE} -- Implementation
id_key: JSON_STRING
once
create Result.make_json ("id")
create Result.make_from_string ("id")
end
location_key: JSON_STRING
once
create Result.make_json ("location")
create Result.make_from_string ("location")
end
status_key: JSON_STRING
once
create Result.make_json ("status")
create Result.make_from_string ("status")
end
items_key : JSON_STRING
once
create Result.make_json ("items")
create Result.make_from_string ("items")
end
name_key : JSON_STRING
once
create Result.make_json ("name")
create Result.make_from_string ("name")
end
size_key : JSON_STRING
once
create Result.make_json ("size")
create Result.make_from_string ("size")
end
quantity_key : JSON_STRING
once
create Result.make_json ("quantity")
create Result.make_from_string ("quantity")
end
option_key : JSON_STRING
once
create Result.make_json ("option")
create Result.make_from_string ("option")
end
feature -- Validation
@@ -171,6 +171,6 @@ feature -- Validation
end
note
copyright: "2011-2012, Javier Velilla and others"
copyright: "2011-2015, Javier Velilla and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
end

View File

@@ -559,8 +559,9 @@ feature {NONE} -- Implementation Repository Layer
do
create joc.make
json.add_converter(joc)
create parser.make_parser (l_post)
if attached parser.parse as jv and parser.is_parsed then
create parser.make_with_string (l_post)
parser.parse_content
if parser.is_valid and then attached parser.parsed_json_value as jv then
if attached {like extract_order_request} json.object (jv, "ORDER") as res then
Result := res
end
@@ -568,6 +569,6 @@ feature {NONE} -- Implementation Repository Layer
end
note
copyright: "2011-2014, Javier Velilla and others"
copyright: "2011-2015, Javier Velilla and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
end

View File

@@ -385,8 +385,12 @@ feature {NONE} -- Implementation Repository Layer
do
create joc.make
json.add_converter(joc)
create parser.make_parser (l_post)
if attached parser.parse as jv and parser.is_parsed then
create parser.make_with_string (l_post)
parser.parse_content
if
parser.is_valid and then
attached parser.parsed_json_value as jv
then
if attached {like extract_order_request} json.object (jv, "ORDER") as res then
Result := res
end
@@ -394,6 +398,6 @@ feature {NONE} -- Implementation Repository Layer
end
note
copyright: "2011-2013, Javier Velilla and others"
copyright: "2011-2015, Javier Velilla and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
end

View File

@@ -12,6 +12,8 @@ inherit
WSF_DEFAULT_SERVICE [IMAGE_UPLOADER_EXECUTION]
SHARED_EXECUTION_ENVIRONMENT
create
make
@@ -26,11 +28,6 @@ feature {NONE} -- Initialization
make_and_launch
end
setup_router
do
end
note
copyright: "2011-2012, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"