• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

a programing question of the JSON output

 
chen likun
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
program name :para
if para compiler as java programe:
java para 100 arg2 null test
note: there are give four arguments,rquest is Uncertainty

the programe output as follow:

{

"all arguments":["100","arg2","null","test"],

"arg1": "100",

"arg2": "arg2",

"arg3": "null",

"arg4": "test"

}

para output required for the formal json format text.

Integrity of the code is feasible and necessary Notes!

please teach me how to write the java programe,thanks!

[ August 27, 2008: Message edited by: chen likun ]

[ August 27, 2008: Message edited by: Bear Bibeault ]
[edit]Disable Smilies. CR[/edit]
[ August 28, 2008: Message edited by: Campbell Ritchie ]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34974
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chen,
Is this a homework question? If so, nobody will do your assignment for you. They will give pointers, but not the code.

In general, it is good advice to start from the simple and work up until you get stuck. That way you can show what you have so far and that you are trying.

For example, can you write a Java program that outputs: {}?
How about "all arguments":["100","arg2","null","test"] ?
etc
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34974
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, this sounds like a question about Java rather than JavaScript so I'll move it to our Java beginners forum.
 
Campbell Ritchie
Sheriff
Pie
Posts: 50278
80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch. You had a stray in your posting, which I got rid of by ticking the "disable smilies" button below and to the left of the posting.

How much Java do you know? Have you got a book? I like Deitel and Deitel (I think a second-hand copy of the 6th edition will do well for a beginner), and lots of people on the Ranch like Sierra & Bates (Head First Java)-make sure to get the 2nd edition. You can find lots of useful information in the Java Tutorials, too. In fact there are things in the Java Tutorials which don't seem to be in any book.
Please post what you have got, and people will be happy to look at it
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic