Merge branch 'master' of github.com:EiffelWebFramework/EWF
This commit is contained in:
@@ -0,0 +1,175 @@
|
|||||||
|
note
|
||||||
|
description: "JSON_PRETTY_STRING_VISITOR Generates the JSON-String for a JSON_VALUE"
|
||||||
|
revision: "0.1"
|
||||||
|
|
||||||
|
class
|
||||||
|
JSON_PRETTY_STRING_VISITOR
|
||||||
|
|
||||||
|
inherit
|
||||||
|
JSON_VISITOR
|
||||||
|
|
||||||
|
create
|
||||||
|
make,
|
||||||
|
make_custom
|
||||||
|
|
||||||
|
feature -- Initialization
|
||||||
|
|
||||||
|
make (a_output: like output)
|
||||||
|
-- Create a new instance
|
||||||
|
do
|
||||||
|
make_custom (a_output, 1, 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
make_custom (a_output: like output; a_object_count_inlining, a_array_count_inlining: INTEGER)
|
||||||
|
-- Create a new instance
|
||||||
|
do
|
||||||
|
output := a_output
|
||||||
|
create indentation.make_empty
|
||||||
|
indentation_step := "%T"
|
||||||
|
|
||||||
|
object_count_inlining := a_object_count_inlining
|
||||||
|
array_count_inlining := a_array_count_inlining
|
||||||
|
end
|
||||||
|
|
||||||
|
feature -- Access
|
||||||
|
|
||||||
|
output: STRING_32
|
||||||
|
-- JSON representation
|
||||||
|
|
||||||
|
indentation: like output
|
||||||
|
|
||||||
|
indentation_step: like indentation
|
||||||
|
|
||||||
|
line_number: INTEGER
|
||||||
|
|
||||||
|
indent
|
||||||
|
do
|
||||||
|
indentation.append (indentation_step)
|
||||||
|
end
|
||||||
|
|
||||||
|
exdent
|
||||||
|
do
|
||||||
|
indentation.remove_tail (indentation_step.count)
|
||||||
|
end
|
||||||
|
|
||||||
|
new_line
|
||||||
|
do
|
||||||
|
output.append ("%N")
|
||||||
|
output.append (indentation)
|
||||||
|
line_number := line_number + 1
|
||||||
|
end
|
||||||
|
|
||||||
|
object_count_inlining: INTEGER
|
||||||
|
array_count_inlining: INTEGER
|
||||||
|
|
||||||
|
feature -- Visitor Pattern
|
||||||
|
|
||||||
|
visit_json_array (a_json_array: JSON_ARRAY)
|
||||||
|
-- Visit `a_json_array'.
|
||||||
|
local
|
||||||
|
value: JSON_VALUE
|
||||||
|
l_json_array: ARRAYED_LIST [JSON_VALUE]
|
||||||
|
l_line: like line_number
|
||||||
|
l_multiple_lines: BOOLEAN
|
||||||
|
do
|
||||||
|
l_json_array := a_json_array.array_representation
|
||||||
|
l_multiple_lines := l_json_array.count >= array_count_inlining or across l_json_array as p some attached {JSON_OBJECT} p.item or attached {JSON_ARRAY} p.item end
|
||||||
|
output.append ("[")
|
||||||
|
l_line := line_number
|
||||||
|
indent
|
||||||
|
from
|
||||||
|
l_json_array.start
|
||||||
|
until
|
||||||
|
l_json_array.off
|
||||||
|
loop
|
||||||
|
if
|
||||||
|
line_number > l_line or
|
||||||
|
l_multiple_lines
|
||||||
|
then
|
||||||
|
new_line
|
||||||
|
end
|
||||||
|
value := l_json_array.item
|
||||||
|
value.accept (Current)
|
||||||
|
l_json_array.forth
|
||||||
|
if not l_json_array.after then
|
||||||
|
output.append (", ")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
exdent
|
||||||
|
if
|
||||||
|
line_number > l_line or
|
||||||
|
l_json_array.count >= array_count_inlining
|
||||||
|
then
|
||||||
|
new_line
|
||||||
|
end
|
||||||
|
output.append ("]")
|
||||||
|
end
|
||||||
|
|
||||||
|
visit_json_boolean (a_json_boolean: JSON_BOOLEAN)
|
||||||
|
-- Visit `a_json_boolean'.
|
||||||
|
do
|
||||||
|
output.append (a_json_boolean.item.out)
|
||||||
|
end
|
||||||
|
|
||||||
|
visit_json_null (a_json_null: JSON_NULL)
|
||||||
|
-- Visit `a_json_null'.
|
||||||
|
do
|
||||||
|
output.append ("null")
|
||||||
|
end
|
||||||
|
|
||||||
|
visit_json_number (a_json_number: JSON_NUMBER)
|
||||||
|
-- Visit `a_json_number'.
|
||||||
|
do
|
||||||
|
output.append (a_json_number.item)
|
||||||
|
end
|
||||||
|
|
||||||
|
visit_json_object (a_json_object: JSON_OBJECT)
|
||||||
|
-- Visit `a_json_object'.
|
||||||
|
local
|
||||||
|
l_pairs: HASH_TABLE [JSON_VALUE, JSON_STRING]
|
||||||
|
l_line: like line_number
|
||||||
|
l_multiple_lines: BOOLEAN
|
||||||
|
do
|
||||||
|
l_pairs := a_json_object.map_representation
|
||||||
|
l_multiple_lines := l_pairs.count >= object_count_inlining or across l_pairs as p some attached {JSON_OBJECT} p.item or attached {JSON_ARRAY} p.item end
|
||||||
|
output.append ("{")
|
||||||
|
l_line := line_number
|
||||||
|
indent
|
||||||
|
from
|
||||||
|
l_pairs.start
|
||||||
|
until
|
||||||
|
l_pairs.off
|
||||||
|
loop
|
||||||
|
if
|
||||||
|
line_number > l_line or
|
||||||
|
l_multiple_lines
|
||||||
|
then
|
||||||
|
new_line
|
||||||
|
end
|
||||||
|
l_pairs.key_for_iteration.accept (Current)
|
||||||
|
output.append (": ")
|
||||||
|
l_pairs.item_for_iteration.accept (Current)
|
||||||
|
l_pairs.forth
|
||||||
|
if not l_pairs.after then
|
||||||
|
output.append (", ")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
exdent
|
||||||
|
if
|
||||||
|
line_number > l_line or
|
||||||
|
l_pairs.count >= object_count_inlining
|
||||||
|
then
|
||||||
|
new_line
|
||||||
|
end
|
||||||
|
output.append ("}")
|
||||||
|
end
|
||||||
|
|
||||||
|
visit_json_string (a_json_string: JSON_STRING)
|
||||||
|
-- Visit `a_json_string'.
|
||||||
|
do
|
||||||
|
output.append ("%"")
|
||||||
|
output.append (a_json_string.item)
|
||||||
|
output.append ("%"")
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
@@ -29,4 +29,4 @@ feature
|
|||||||
Result.add_converter (jhtc)
|
Result.add_converter (jhtc)
|
||||||
end
|
end
|
||||||
|
|
||||||
end -- class SHARED_GOBO_EJSON
|
end -- class SHARED_GOBO_EJSON
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
note
|
||||||
|
description: "A JSON converter for ARRAYED_LIST [ANY]"
|
||||||
|
author: "Paul Cohen"
|
||||||
|
date: "$Date$"
|
||||||
|
revision: "$Revision$"
|
||||||
|
file: "$HeadURL: $"
|
||||||
|
|
||||||
|
class JSON_ARRAYED_LIST_CONVERTER
|
||||||
|
|
||||||
|
inherit
|
||||||
|
JSON_LIST_CONVERTER
|
||||||
|
redefine
|
||||||
|
object
|
||||||
|
end
|
||||||
|
|
||||||
|
create
|
||||||
|
make
|
||||||
|
|
||||||
|
feature -- Access
|
||||||
|
|
||||||
|
object: ARRAYED_LIST [detachable ANY]
|
||||||
|
|
||||||
|
feature {NONE} -- Factory
|
||||||
|
|
||||||
|
new_object (nb: INTEGER): like object
|
||||||
|
do
|
||||||
|
create Result.make (nb)
|
||||||
|
end
|
||||||
|
|
||||||
|
end -- class JSON_ARRAYED_LIST_CONVERTER
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
note
|
note
|
||||||
description: "A JSON converter"
|
description: "A JSON converter"
|
||||||
author: "Paul Cohen"
|
author: "Paul Cohen"
|
||||||
date: "$Date: $"
|
date: "$Date$"
|
||||||
revision: "$Revision: $"
|
revision: "$Revision$"
|
||||||
file: "$HeadURL: $"
|
file: "$HeadURL: $"
|
||||||
|
|
||||||
deferred class JSON_CONVERTER
|
deferred class JSON_CONVERTER
|
||||||
@@ -19,7 +19,7 @@ feature -- Access
|
|||||||
|
|
||||||
feature -- Conversion
|
feature -- Conversion
|
||||||
|
|
||||||
from_json (j: attached like to_json): detachable like object
|
from_json (j: attached like to_json): detachable like object
|
||||||
-- Convert from JSON value.
|
-- Convert from JSON value.
|
||||||
-- Returns Void if unable to convert
|
-- Returns Void if unable to convert
|
||||||
deferred
|
deferred
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
note
|
note
|
||||||
description: "A JSON converter for HASH_TABLE [ANY, HASHABLE]"
|
description: "A JSON converter for HASH_TABLE [ANY, HASHABLE]"
|
||||||
author: "Paul Cohen"
|
author: "Paul Cohen"
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
file: "$HeadURL: $"
|
file: "$HeadURL: $"
|
||||||
|
|
||||||
class JSON_HASH_TABLE_CONVERTER
|
class JSON_HASH_TABLE_CONVERTER
|
||||||
@@ -26,7 +26,7 @@ feature -- Access
|
|||||||
|
|
||||||
feature -- Conversion
|
feature -- Conversion
|
||||||
|
|
||||||
from_json (j: attached like to_json): like object
|
from_json (j: attached like to_json): like object
|
||||||
local
|
local
|
||||||
keys: ARRAY [JSON_STRING]
|
keys: ARRAY [JSON_STRING]
|
||||||
i: INTEGER
|
i: INTEGER
|
||||||
@@ -41,7 +41,7 @@ feature -- Conversion
|
|||||||
until
|
until
|
||||||
i > keys.count
|
i > keys.count
|
||||||
loop
|
loop
|
||||||
h ?= json.object (keys [i], void)
|
h ?= json.object (keys [i], Void)
|
||||||
check h /= Void end
|
check h /= Void end
|
||||||
jv := j.item (keys [i])
|
jv := j.item (keys [i])
|
||||||
if jv /= Void then
|
if jv /= Void then
|
||||||
|
|||||||
@@ -1,63 +1,30 @@
|
|||||||
note
|
note
|
||||||
description: "A JSON converter for LINKED_LIST [ANY]"
|
description: "A JSON converter for LINKED_LIST [ANY]"
|
||||||
author: "Paul Cohen"
|
author: "Paul Cohen"
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
file: "$HeadURL: $"
|
file: "$HeadURL: $"
|
||||||
|
|
||||||
class JSON_LINKED_LIST_CONVERTER
|
class JSON_LINKED_LIST_CONVERTER
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
JSON_CONVERTER
|
JSON_LIST_CONVERTER
|
||||||
|
redefine
|
||||||
|
object
|
||||||
|
end
|
||||||
|
|
||||||
create
|
create
|
||||||
make
|
make
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
|
||||||
|
|
||||||
make
|
|
||||||
do
|
|
||||||
create object.make
|
|
||||||
end
|
|
||||||
|
|
||||||
feature -- Access
|
feature -- Access
|
||||||
|
|
||||||
object: LINKED_LIST [detachable ANY]
|
object: LINKED_LIST [detachable ANY]
|
||||||
|
|
||||||
feature -- Conversion
|
feature {NONE} -- Factory
|
||||||
|
|
||||||
from_json (j: like to_json): detachable like object
|
new_object (nb: INTEGER): like object
|
||||||
local
|
do
|
||||||
i: INTEGER
|
create Result.make
|
||||||
do
|
end
|
||||||
create Result.make
|
|
||||||
from
|
|
||||||
i := 1
|
|
||||||
until
|
|
||||||
i > j.count
|
|
||||||
loop
|
|
||||||
Result.extend (json.object (j [i], Void))
|
|
||||||
i := i + 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
to_json (o: like object): JSON_ARRAY
|
|
||||||
local
|
|
||||||
c: ITERATION_CURSOR [detachable ANY]
|
|
||||||
do
|
|
||||||
create Result.make_array
|
|
||||||
from
|
|
||||||
c := o.new_cursor
|
|
||||||
until
|
|
||||||
c.after
|
|
||||||
loop
|
|
||||||
if attached json.value (c.item) as v then
|
|
||||||
Result.add (v)
|
|
||||||
else
|
|
||||||
check attached_value: False end
|
|
||||||
end
|
|
||||||
c.forth
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end -- class JSON_LINKED_LIST_CONVERTER
|
end -- class JSON_LINKED_LIST_CONVERTER
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
note
|
||||||
|
description: "A JSON converter for LIST [ANY]"
|
||||||
|
author: "Paul Cohen"
|
||||||
|
date: "$Date$"
|
||||||
|
revision: "$Revision$"
|
||||||
|
file: "$HeadURL: $"
|
||||||
|
|
||||||
|
deferred class JSON_LIST_CONVERTER
|
||||||
|
|
||||||
|
inherit
|
||||||
|
JSON_CONVERTER
|
||||||
|
|
||||||
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
|
make
|
||||||
|
do
|
||||||
|
object := new_object (0)
|
||||||
|
end
|
||||||
|
|
||||||
|
feature -- Access
|
||||||
|
|
||||||
|
object: LIST [detachable ANY]
|
||||||
|
|
||||||
|
feature {NONE} -- Factory
|
||||||
|
|
||||||
|
new_object (nb: INTEGER): like object
|
||||||
|
deferred
|
||||||
|
ensure
|
||||||
|
Result /= Void
|
||||||
|
end
|
||||||
|
|
||||||
|
feature -- Conversion
|
||||||
|
|
||||||
|
from_json (j: attached like to_json): detachable like object
|
||||||
|
local
|
||||||
|
i: INTEGER
|
||||||
|
do
|
||||||
|
Result := new_object (j.count)
|
||||||
|
from
|
||||||
|
i := 1
|
||||||
|
until
|
||||||
|
i > j.count
|
||||||
|
loop
|
||||||
|
Result.extend (json.object (j [i], Void))
|
||||||
|
i := i + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
to_json (o: like object): detachable JSON_ARRAY
|
||||||
|
local
|
||||||
|
c: ITERATION_CURSOR [detachable ANY]
|
||||||
|
jv: detachable JSON_VALUE
|
||||||
|
failed: BOOLEAN
|
||||||
|
do
|
||||||
|
create Result.make_array
|
||||||
|
from
|
||||||
|
c := o.new_cursor
|
||||||
|
until
|
||||||
|
c.after
|
||||||
|
loop
|
||||||
|
jv := json.value (c.item)
|
||||||
|
if jv /= Void then
|
||||||
|
Result.add (jv)
|
||||||
|
else
|
||||||
|
failed := True
|
||||||
|
end
|
||||||
|
c.forth
|
||||||
|
end
|
||||||
|
if failed then
|
||||||
|
Result := Void
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end -- class JSON_ARRAYED_LIST_CONVERTER
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
note
|
note
|
||||||
description: "Core factory class for creating JSON objects and corresponding Eiffel objects."
|
description: "Core factory class for creating JSON objects and corresponding Eiffel objects."
|
||||||
author: "Paul Cohen"
|
author: "Paul Cohen"
|
||||||
date: "$Date: $"
|
date: "$Date$"
|
||||||
revision: "$Revision: $"
|
revision: "$Revision$"
|
||||||
file: "$HeadURL: $"
|
file: "$HeadURL: $"
|
||||||
|
|
||||||
class EJSON
|
class EJSON
|
||||||
@@ -69,7 +69,7 @@ feature -- Access
|
|||||||
elseif attached {STRING_8} an_object as s8 then
|
elseif attached {STRING_8} an_object as s8 then
|
||||||
create {JSON_STRING} Result.make_json (s8)
|
create {JSON_STRING} Result.make_json (s8)
|
||||||
elseif attached {STRING_32} an_object as s32 then
|
elseif attached {STRING_32} an_object as s32 then
|
||||||
create {JSON_STRING} Result.make_json (s32.as_string_8) -- FIXME: need correct convertion/encoding here ...
|
create {JSON_STRING} Result.make_json_from_string_32 (s32)
|
||||||
end
|
end
|
||||||
|
|
||||||
if Result = Void then
|
if Result = Void then
|
||||||
@@ -253,9 +253,9 @@ feature {NONE} -- Implementation (Exceptions)
|
|||||||
-- Exception message for failing to convert `a' to a JSON_VALUE.
|
-- Exception message for failing to convert `a' to a JSON_VALUE.
|
||||||
do
|
do
|
||||||
Result := exception_prefix + "Failed to convert Eiffel object to a JSON_VALUE"
|
Result := exception_prefix + "Failed to convert Eiffel object to a JSON_VALUE"
|
||||||
if an_object /= Void then
|
if an_object /= Void then
|
||||||
Result := ": " + an_object.generator
|
Result := ": " + an_object.generator
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
feature {NONE} -- Implementation (JSON parser)
|
feature {NONE} -- Implementation (JSON parser)
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
note
|
note
|
||||||
description: "[
|
description: "[
|
||||||
Shared factory class for creating JSON objects. Maps JSON
|
Shared factory class for creating JSON objects. Maps JSON
|
||||||
objects to ELKS HASH_TABLEs and JSON arrays to ELKS
|
objects to ELKS HASH_TABLEs and JSON arrays to ELKS
|
||||||
LINKED_LISTs. Use non-conforming inheritance from this
|
LINKED_LISTs. Use non-conforming inheritance from this
|
||||||
class to ensure that your classes share the same
|
class to ensure that your classes share the same
|
||||||
JSON_FACTORY instance.
|
JSON_FACTORY instance.
|
||||||
]"
|
]"
|
||||||
author: "Paul Cohen"
|
author: "Paul Cohen"
|
||||||
date: "$Date: $"
|
date: "$Date$"
|
||||||
revision: "$Revision: $"
|
revision: "$Revision: 89185 $"
|
||||||
file: "$HeadURL: $"
|
file: "$HeadURL: $"
|
||||||
|
|
||||||
class SHARED_EJSON
|
class SHARED_EJSON
|
||||||
@@ -17,16 +17,22 @@ feature
|
|||||||
|
|
||||||
json: EJSON
|
json: EJSON
|
||||||
-- A shared EJSON instance with default converters for
|
-- A shared EJSON instance with default converters for
|
||||||
-- DS_LINKED_LIST [ANY] and DS_HASH_TABLE [ANY, HASHABLE]
|
--LINKED_LIST [ANY] and HASH_TABLE [ANY, HASHABLE]
|
||||||
local
|
local
|
||||||
|
jalc: JSON_ARRAYED_LIST_CONVERTER
|
||||||
jllc: JSON_LINKED_LIST_CONVERTER
|
jllc: JSON_LINKED_LIST_CONVERTER
|
||||||
jhtc: JSON_HASH_TABLE_CONVERTER
|
jhtc: JSON_HASH_TABLE_CONVERTER
|
||||||
once
|
once
|
||||||
create Result
|
create Result
|
||||||
|
|
||||||
|
create jalc.make
|
||||||
|
Result.add_converter (jalc)
|
||||||
|
|
||||||
create jllc.make
|
create jllc.make
|
||||||
Result.add_converter (jllc)
|
Result.add_converter (jllc)
|
||||||
|
|
||||||
create jhtc.make
|
create jhtc.make
|
||||||
Result.add_converter (jhtc)
|
Result.add_converter (jhtc)
|
||||||
end
|
end
|
||||||
|
|
||||||
end -- class SHARED_EJSON
|
end -- class SHARED_EJSON
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
note
|
note
|
||||||
description: "A JSON converter for AUTHOR"
|
description: "A JSON converter for AUTHOR"
|
||||||
author: "Paul Cohen"
|
author: "Paul Cohen"
|
||||||
date: "$Date: 2010-03-08 20:46:59 -0300 (Mon, 08 Mar 2010) $"
|
date: "$Date$"
|
||||||
revision: "$Revision: 82 $"
|
revision: "$Revision$"
|
||||||
file: "$HeadURL: https://svn.origo.ethz.ch/ejson/branches/POC-converters-factory/test/json_author_converter.e $"
|
|
||||||
|
|
||||||
class JSON_AUTHOR_CONVERTER
|
class JSON_AUTHOR_CONVERTER
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
note
|
note
|
||||||
description: "A JSON converter for BOOK_COLLECTION"
|
description: "A JSON converter for BOOK_COLLECTION"
|
||||||
author: "Paul Cohen"
|
author: "Paul Cohen"
|
||||||
date: "$Date: 2010-03-08 20:46:59 -0300 (Mon, 08 Mar 2010) $"
|
date: "$Date$"
|
||||||
revision: "$Revision: 82 $"
|
revision: "$Revision$"
|
||||||
file: "$HeadURL: https://svn.origo.ethz.ch/ejson/branches/POC-converters-factory/test/json_book_collection_converter.e $"
|
|
||||||
|
|
||||||
class JSON_BOOK_COLLECTION_CONVERTER
|
class JSON_BOOK_COLLECTION_CONVERTER
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
note
|
note
|
||||||
description: "A JSON converter for BOOK"
|
description: "A JSON converter for BOOK"
|
||||||
author: "Paul Cohen"
|
author: "Paul Cohen"
|
||||||
date: "$Date: 2010-03-08 20:46:59 -0300 (Mon, 08 Mar 2010) $"
|
date: "$Date$"
|
||||||
revision: "$Revision: 82 $"
|
revision: "$Revision$"
|
||||||
file: "$HeadURL: https://svn.origo.ethz.ch/ejson/branches/POC-converters-factory/test/json_book_converter.e $"
|
|
||||||
|
|
||||||
class JSON_BOOK_CONVERTER
|
class JSON_BOOK_CONVERTER
|
||||||
|
|
||||||
|
|||||||
@@ -632,7 +632,7 @@ feature -- Test
|
|||||||
jrep := "%"foo\\bar%""
|
jrep := "%"foo\\bar%""
|
||||||
create parser.make_parser (jrep)
|
create parser.make_parser (jrep)
|
||||||
if attached {JSON_STRING} parser.parse as jstring then
|
if attached {JSON_STRING} parser.parse as jstring then
|
||||||
assert ("unescaped string %"foo\\bar%" to %"foo\bar%"", jstring.unescaped_string_8.same_string ("foo\bar"))
|
assert ("unescaped string %"foo\\bar%" to %"foo\bar%"", jstring.unescaped_string.same_string ("foo\bar"))
|
||||||
end
|
end
|
||||||
|
|
||||||
create js.make_json_from_string_32 ({STRING_32}"%/20320/%/22909/")
|
create js.make_json_from_string_32 ({STRING_32}"%/20320/%/22909/")
|
||||||
|
|||||||
@@ -17,10 +17,15 @@ or go to [[step_3.wiki|step 3]]
|
|||||||
** This is used to build the application in a portable manner, but for this compilation, it uses Eiffel Web Nino as connector.
|
** This is used to build the application in a portable manner, but for this compilation, it uses Eiffel Web Nino as connector.
|
||||||
** We use Eiffel Web Nino for this tutorial, because there is no need to configure any apache, iis, and so on. And it is convenient to execute inside EiffelStudio
|
** We use Eiffel Web Nino for this tutorial, because there is no need to configure any apache, iis, and so on. And it is convenient to execute inside EiffelStudio
|
||||||
|
|
||||||
|
* To see the result, you should open http://localhost/ on your web browser. Note if the application is using another port such as 9999, you should open http://localhost:9999/
|
||||||
|
|
||||||
* You will find inside [[step_2]] the "hello" project
|
* You will find inside [[step_2]] the "hello" project
|
||||||
** target "hello" provides a very simple implementation (But by default, it is using port 80 with Eiffel Web Nino, which might already be busy by other application)
|
** target "hello" provides a very simple implementation (But by default, it is using port 80 with Eiffel Web Nino, which might already be busy by other application)
|
||||||
** target "hello_custom" which uses almost the same code, but in addition, you can use the ewf.ini file to precise the port number (9999 for this example)
|
** target "hello_custom" which uses almost the same code, but in addition, you can use the ewf.ini file to precise the port number (9999 for this example)
|
||||||
|
|
||||||
|
* To see the result, open http://localhost/ in a web browser.
|
||||||
|
* Note, if the application is using port different from 80, such as 9999, open http://localhost:9999/
|
||||||
|
|
||||||
* Eiffel code
|
* Eiffel code
|
||||||
class
|
class
|
||||||
HELLO_APPLICATION
|
HELLO_APPLICATION
|
||||||
|
|||||||
Reference in New Issue
Block a user