Thanks,
So, Do I need to include json library to my server.js Or Ape support ?
Thank you

Summer Nguyen !!!

On Feb 26, 2011, at 18:21, <[email protected]> wrote:

It's Javascript. The JSON you pass is converted to a regular Javascript
Object.
object.a should give you 1. You can iterate over the object like a normal
javascript object.

On Sat, 26 Feb 2011 17:22:38 +0700, Summer nguyen
<[email protected]> wrote:
Thank you so much.
I did inlinepush sucessfully.
But I still get 1 Error with JSON .
I have a Json type  global variable
ex:  {'a':1,'b':2, 'c':3};

I want to get {'a':1}   JSON object only.
How do I create a new JSON object in APE. Please help me.  Thank you
very much.

On Sat, Feb 26, 2011 at 4:25 AM, Anthony Catel  wrote:
  Check the response of your request that APE give you back.

Le 25/02/2011 15:14, Summer nguyen a écrit : P.S:  I use Controller
in Demo. It works !!!,
How would I fix it. Thank you

On Fri, Feb 25, 2011 at 9:11 PM, Summer nguyen  wrote:
Thank you so much.
btw, I have a question with inlinepush:

I use Java to push to APE Server,
Here is my code :

            JSONObject obj2 = new JSONObject();

            obj2.put("hehe", "hoho");
            JSONObject obj1 = new JSONObject();

            obj1.put(new String("password"), new
String("testpasswd"));
            obj1.put("raw", "raw");
            obj1.put("channel","product");
            obj1.put("data", obj2);

            JSONObject obj = new JSONObject();
            obj.put("cmd", "inlinepush");
            obj.put("params",obj1);


            System.out.println(obj);
            String URLs = server
+URLEncoder.encode("["+obj.toString()+"]");


// PUSH to inlinepush

               java.net.URL url = null;
                url = new java.net.URL(URLs);
                URLConnection connection =
url.openConnection();
                connection.connect();

Here is the URL I get before encoding:
http://192.168.1.199:6969/0/?[{

[3]"cmd":"inlinepush","params":{"raw":"raw","data": {"hehe":"hoho"},"channel":"product","password":"testpasswd"}}]
and After encoding:


http://192.168.1.199:6969/0/?%5B%7B%22cmd%22%3A%22inlinepush%22%2C%22params%22%3A%7B%22raw%22%3A%22raw%22%2C%22data%22%3A%7B%22hehe%22%3A%22hoho%22%7D%2C%22channel%22%3A%22product%22%2C%22password%22%3A%22testpasswd%22%7D%7D%5D
[4]

But, inlinepush dont catch that comand. Please tell me why. Thank you
very much,
On Fri, Feb 25, 2011 at 4:45 PM,  wrote:
Hey,

Indeed you can, for instance, store what you want in "Ape." or simply
in
the global namespace by declaring the variable out of a function.

Anthony

On Fri, 25 Feb 2011 16:17:03 +0700, Summer nguyen
 wrote:
Dear,
I want to do something like this :

I have Java App to push infomation to APE Server (using inlinepush).
I want inlinepush Ape Server Store infomation in somewhere ( like  a
global variable) instead of  forwarding the infomation to all user
in
the channel.
 Then, I use APE Server to send responds to client using the
infomation
store in the global variable.
Note: each client request a part of the infomation.

Example :
Java Push the infomation:
{'a':1, 'b':2, 'c':3};
 Then APE inpushline store this infomation to a global variable.
APE use the infomation stored in the global variable to send to
clients
:
Client 1:  send  only :  'a':1 ,
Client 2: send only :  'b':2,
 Client 3:  send only 'c':3

Do you have any ideas ?. Thank you very much

 --
 You received this message because you are subscribed to the Google
 Groups "APE Project" group.
 To post to this group, send email to [email protected]
[7]
 To unsubscribe from this group, send email to
 [email protected] [8]
 For more options, visit this group at
 http://groups.google.com/group/ape-project?hl=en [9] [1]
 ---
 APE Project (Ajax Push Engine)
 Official website : http://www.ape-project.org/ [10] [2]
 Git Hub : http://github.com/APE-Project/ [11] [3]


Links:
------
[1] http://groups.google.com/group/ape-project?hl=en [12]
[2] http://www.ape-project.org/ [13]
[3] http://github.com/APE-Project/ [14]

--
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected] [15]
To unsubscribe from this group, send email to
[email protected] [16]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en [17]
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/ [18]
Git Hub : http://github.com/APE-Project/ [19]

--
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected] [20]
To unsubscribe from this group, send email to
[email protected] [21]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en [22]
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/ [23]
Git Hub : http://github.com/APE-Project/ [24]

--
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected] [25]
To unsubscribe from this group, send email to
[email protected] [26]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en [27]
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/ [28]
Git Hub : http://github.com/APE-Project/ [29]

--
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en [30]
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/ [31]
Git Hub : http://github.com/APE-Project/ [32]


Links:
------
[1] mailto:[email protected]
[2] mailto:[email protected]
[3] http://192.168.1.199:6969/0/?[%7B
[4]

http://192.168.1.199:6969/0/?%5B%7B%22cmd%22%3A%22inlinepush%22%2C%22params%22%3A%7B%22raw%22%3A%22raw%22%2C%22data%22%3A%7B%22hehe%22%3A%22hoho%22%7D%2C%22channel%22%3A%22product%22%2C%22password%22%3A%22testpasswd%22%7D%7D%5D
[5] mailto:[email protected]
[6] mailto:[email protected]
[7] mailto:[email protected]
[8] mailto:ape-project%[email protected]
[9] http://groups.google.com/group/ape-project?hl=en
[10] http://www.ape-project.org/
[11] http://github.com/APE-Project/
[12] http://groups.google.com/group/ape-project?hl=en
[13] http://www.ape-project.org/
[14] http://github.com/APE-Project/
[15] mailto:[email protected]
[16] mailto:ape-project%[email protected]
[17] http://groups.google.com/group/ape-project?hl=en
[18] http://www.ape-project.org/
[19] http://github.com/APE-Project/
[20] mailto:[email protected]
[21] mailto:[email protected]
[22] http://groups.google.com/group/ape-project?hl=en
[23] http://www.ape-project.org/
[24] http://github.com/APE-Project/
[25] mailto:[email protected]
[26] mailto:ape-project%[email protected]
[27] http://groups.google.com/group/ape-project?hl=en
[28] http://www.ape-project.org/
[29] http://github.com/APE-Project/
[30] http://groups.google.com/group/ape-project?hl=en
[31] http://www.ape-project.org/
[32] http://github.com/APE-Project/

--
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

--
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to