Don't use the JSON plugin? The point of it is to create JSON, but you
already have JSON.
On Feb 18, 2015 7:18 AM, "bavon mike" wrote:
> I already have a json string like:
>
> {"name": "Simple name", "description": "simple descriptio
I already have a json string like:
{"name": "Simple name", "description": "simple description"}
When using Struts 2 json plugin, it returns escaped string like:
{\"name\": \"Simple name\", \"description\": \"simpl
2014-11-05 13:41 GMT+01:00 Pavel Ilyushko :
> Hi there!
>
> Thanks for a swift reply.
>
> Actually, re-defining the root is what I applied as a work-around.
>
> So in my struts.xml I have this (to fix setting the parameters on the
> action):
>
>
> action
>
Hi there!
Thanks for a swift reply.
Actually, re-defining the root is what I applied as a work-around.
So in my struts.xml I have this (to fix setting the parameters on the
action):
action
and also for each json action type I have this (to
You can redefine root
http://struts.apache.org/release/2.3.x/docs/json-plugin.html#JSONPlugin-RootObject
2014-11-05 12:13 GMT+01:00 Pavel Ilyushko :
> Hello there!
>
> Recently I've upgraded our struts2 framework and its related plugins (eg:
> json plugin) from version 2.1.8 to version 2.3.16.3.
You can re-define root
http://struts.apache.org/release/2.3.x/docs/json-plugin.html#JSONPlugin-RootObject
2014-11-05 12:13 GMT+01:00 Pavel Ilyushko :
> Hello there!
>
> Recently I've upgraded our struts2 framework and its related plugins (eg:
> json plugin) from version 2.1.8 to version 2.3.16.3.
Hello there!
Recently I've upgraded our struts2 framework and its related plugins (eg:
json plugin) from version 2.1.8 to version 2.3.16.3.
Now I'm having problems in using the json plugin while making json requests
and returning the json responses.
The problem is that the parameter values passe
Hi,
I've just started using JSON plugin and noticed strange behaviour. It looks
like JSON annotation fields are completely ignored by the plugin. My action
looks like this:
public class TestAction extends ActionSupport {
private Date date;
@JSON(format = "-MM-dd HH:mm:ss Z")
publ
So changing this around seems to correct it. I'm not sure why though, to
my knowledge it shouldn't have been using a proxy.
public class ChangeProcessAction {
private StatusService statusService;
private OrderService orderService;
private Status status;
private Integer orderId;
Ill give this a whirl, and you're probably right, but this used to work
while using DBCP. Any idea as to why this would be broken in c3p0? I
tried to do some digging under the hood but couldn't find sources the
classes that were breaking.
Thanks,
-Tim
Greg Lindholm wrote:
Wild guess you
Wild guess you are trying to serialize (with JSON plugin) a
Hibernate proxy object.
Maybe your object has a reference to another lazy loaded object or collection.
Using reflection on a proxy object is usually a bad idea.
You may need to clone the object (to get a real one) first before
serial
Hello,
I just recently switched to c3p0 and it fixed some other issues I
was having with dbcp, but another has arisen.
It seems to be a combination of using the c3p0 data source along
with the JSON plugin. Here's my (slightly shortened) stacktrace:
Caused by: org.apache.struts2.json.JSO
the call reaches the server and returns me an
>>> exception :
>>> :35,013 ERROR [RPCError] java.util.HashMap cannot be cast to java.util.List
>>> java.lang.ClassCastException: java.util.HashMap cannot be cast to
>>> java.util.List
>>>
g.apache.struts2.json.JSONInterceptor.invoke(JSONInterceptor.java:204)
>> at
>> org.apache.struts2.json.JSONInterceptor.intercept(JSONInterceptor.java:131)
>> at
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237
oke(DefaultActionInvocation.java:237)
> at
> org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
> at
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
> at
> org.apache.struts2.dispatcher.FilterDispatcher.d
at
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
at
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
I am also using Spring 2.5 and H
Just as a follow up to anyone interested, I added the interceptor to the
JSON plugin. Dates in RFC 3339 format are also supported. Serialization
and deserialization can be customized using annotations. For more details:
http://cwiki.apache.org/S2PLUGINS/json-plugin.html
musachy
Musachy Barros
Added.
musachy
Frank W. Zammetti wrote:
I'm in the last month or so of work on my next book, so chances are you'll
finish it all off long before I have a chance to jump in, but just in
case, my username is fzammetti (I'm not terribly original!) In the mean
time, feel perfectly free to ping me
Well my intention was to have it in S2, given some people need it and it
is a simple thing. The autocompleter tag also needs it, but that one
will fly to a plugin soon after 2.0.3. As a side not, for those
interested on ajax stuff, check the GWT S2 plugin also, free membership
available for you
Actually, I was going to commit it as a plug-in to the s2 code base in
the next few weeks. But since Musachy started a separate project, it
seems logical to have it all together - also means I have less to do ;-)
/Ian
Ted Husted wrote:
:) I think this is the part where Musachy gives Ian ac
I'm in the last month or so of work on my next book, so chances are you'll
finish it all off long before I have a chance to jump in, but just in
case, my username is fzammetti (I'm not terribly original!) In the mean
time, feel perfectly free to ping me if you have any questions about the
code (I
This whole thing started with Frank's code, and I'm indeed going to
reuse it. As for access to the google project, I just need the gmail
user name. Frank if you are interested jump in and send me your gmail
user name.
regards
musachy
Ted Husted wrote:
:) I think this is the part where Musach
:) I think this is the part where Musachy gives Ian access to the
Google Code project :)
On 1/12/07, Ian Roughley <[EMAIL PROTECTED]> wrote:
I think Frank already has the code in the defect, adding it would be
very simple.
/Ian
-
I think Frank already has the code in the defect, adding it would be
very simple.
/Ian
Musachy Barroso wrote:
That will be coming up next, I need the JSON result of other things
and didn't have time to do the whole result/interceptor thing, so this
is just the first part :)
thanks
musachy
It does indeed... populates from JSON -or- XML, and provides output in
both formats.
Frank
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of "Practical Ajax Projects With Java Technology"
That will be coming up next, I need the JSON result of other things and
didn't have time to do the whole result/interceptor thing, so this is
just the first part :)
thanks
musachy
Ian Roughley wrote:
Have you looked at http://issues.apache.org/struts/browse/WW-1330? It
might be a great compa
Have you looked at http://issues.apache.org/struts/browse/WW-1330? It
might be a great companion for your result type. I believe it allows an
action to be populated from a JSON request.
/Ian
Musachy Barroso wrote:
The JSON plugin has been added to the registry. Hosted here:
http://code.go
The JSON plugin has been added to the registry. Hosted here:
http://code.google.com/p/jsonplugin/
regards
musachy
Ted Husted wrote:
On 1/8/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:
Soon we will have a "json" result type,
that will take care of serializing the action to a json string for
That's true, I was thinking about it yesterday, I will roll it into a
plugin today.
musachy
Ted Husted wrote:
On 1/8/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:
Soon we will have a "json" result type,
that will take care of serializing the action to a json string for you.
Why wait? Someo
On 1/8/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:
Soon we will have a "json" result type,
that will take care of serializing the action to a json string for you.
Why wait? Someone could convert WW-1604 and WW- 1330 to a plugin, post
it to the registry, and people could start using it today.
The autocmpleter needs to get the data in some format, that format is
JSON, the response needs to be something like:
[
["Text1", "Key1"],
["Text2", "Key2"],
]
Remember that what you return from "execute" is not the response, it is
the result, like "success" or "input", so you can't return
See also
* https://issues.apache.org/struts/browse/WW-1604
On 1/8/07, Dariusz Wojtas <[EMAIL PROTECTED]> wrote:
http://json.org/
Something of form:
[["name", "id"], ["name", "id"]]
or
[["name", "id"], ["name", "id"],]
Remember to escape special characters.
Dariusz Wojtas
On 1/8/07, André
http://json.org/
Something of form:
[["name", "id"], ["name", "id"]]
or
[["name", "id"], ["name", "id"],]
Remember to escape special characters.
Dariusz Wojtas
On 1/8/07, André Faria <[EMAIL PROTECTED]> wrote:
What is necessary to write a JSON response in struts to use with a
Autocomplete
What is necessary to write a JSON response in struts to use with a
Autocomplete tag?
example:
public class JSONListAction {
public String execute {
return JSON object!
}
}
Thank's
André Faria
--
34 matches
Mail list logo