Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example 6-1 - Customize JSON outputs #4

Closed
GoogleCodeExporter opened this issue Mar 18, 2015 · 6 comments
Closed

Example 6-1 - Customize JSON outputs #4

GoogleCodeExporter opened this issue Mar 18, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

Hallo I try example 6.1 but i get: [User@a4edc4,User@1f5eb7f,User@381a53] 
 where is the problem ?  

Original issue reported on code.google.com by xxxxma...@gmail.com on 22 Apr 2009 at 8:41

@GoogleCodeExporter
Copy link
Author

Make sure your User class implement JSONAware:

class User implements JSONAware{
  ...
}

Original comment by fangyid...@gmail.com on 23 Apr 2009 at 4:10

@GoogleCodeExporter
Copy link
Author

Yes I create interface JSONAware in same package and implement JSONAware. Look 
at my
code : http://stargate.cnl.tuke.sk/~maly/simple

Original comment by xxxxma...@gmail.com on 23 Apr 2009 at 6:14

@GoogleCodeExporter
Copy link
Author

I looked into your code. You should do 2 things below:
1. Use JSONAware(org.json.simple.JSONAware) from JSON.simple instead of 
creating your
own;

2. class User should implement org.json.simple.JSONAware:
class User implements org.json.simple.JSONAware {
  ...
}

Original comment by fangyid...@gmail.com on 23 Apr 2009 at 10:04

@GoogleCodeExporter
Copy link
Author

Ok, I pass interface org.json.simple.JSONAware into package org.json.simple.* 
but
error always exist. I am dispairing. I give on server test web app which 
content only
this trouble> http://stargate.cnl.tuke.sk/~maly/jquery_1/  

Original comment by xxxxma...@gmail.com on 23 Apr 2009 at 6:13

@GoogleCodeExporter
Copy link
Author

Your resultJ.java looks good. Please make sure the compiled resultJ.class is up 
to
date and no old version is cached in you app classpath.

Original comment by fangyid...@gmail.com on 27 Apr 2009 at 4:42

@GoogleCodeExporter
Copy link
Author

Original comment by fangyid...@gmail.com on 28 Apr 2009 at 2:59

  • Changed state: Invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant