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

Ant task(s) for jsonschema2pojo #23

Closed
joelittlejohn opened this issue Jun 23, 2013 · 10 comments
Closed

Ant task(s) for jsonschema2pojo #23

joelittlejohn opened this issue Jun 23, 2013 · 10 comments

Comments

@joelittlejohn
Copy link
Owner

Original author: joelittl...@gmail.com (April 28, 2011 19:22:08)

Alongside the maven plugin and cli, it would be good to offer an Ant task to invoke jsonschema2pojo.

Feel free to +1 this ticket by commenting if you're interested in this.

Original issue: http://code.google.com/p/jsonschema2pojo/issues/detail?id=23

@joelittlejohn
Copy link
Owner Author

From dexter2...@gmail.com on November 20, 2011 09:04:39
Should be very useful. Currently, I have my own wrapper classes around jsonschema2pojo-cli library. Hoping to hear an update on this soon though this might not be top in priority.

@joelittlejohn
Copy link
Owner Author

From joelittl...@gmail.com on January 17, 2012 21:55:19
In progress...

@joelittlejohn
Copy link
Owner Author

From joelittl...@gmail.com on January 18, 2012 00:18:16
Code is done here. Need some docs on the wiki.

@joelittlejohn
Copy link
Owner Author

From sridha...@gmail.com on January 18, 2012 00:40:19
jsonschema2pojo Ant task is not downloadable as mentioned in the docs can you please point me to the jar file that I can download?

@joelittlejohn
Copy link
Owner Author

From sridha...@gmail.com on January 18, 2012 00:42:32
Here is the link from Getting Started that is not working
http://repo1.maven.org/maven2/com/googlecode/jsonschema2pojo/jsonschema2pojo-ant/0.2.0/jsonschema2pojo-ant-0.2.1.jar

@joelittlejohn
Copy link
Owner Author

From joelittl...@gmail.com on January 18, 2012 00:48:38
Yes, apologies. I haven't had time to create the new 0.2.1 release yet so the link doesn't yet work.

I'm planning to release this tomorrow, but in the mean time you could clone the source and build a 0.2.1-SNAPSHOT of the jsonschema2pojo-ant jar by using 'mvn clean package'

@joelittlejohn
Copy link
Owner Author

From sridha...@gmail.com on January 18, 2012 02:00:55
Unfortunately I am not using maven

@joelittlejohn
Copy link
Owner Author

From sridha...@gmail.com on January 18, 2012 18:33:53
I got around with your suggestion by taking the snapshot and building, Thanks Joe !!!
BTW does anyone know any tools to generate json schema from json document? Eg: toos like trang.jar to generate xsd from xml

@joelittlejohn
Copy link
Owner Author

From joelittl...@gmail.com on January 18, 2012 19:53:16
sridharev: Glad you got something working. How are you finding the snapshot? Does the task operate as you expect? I'm planning to release 0.2.1 in the next few moments so you can get the official release.

For generating schema documents, I don't think there is anything out there to do this right now. I know Jackson can generate schema documents from Java pojos (basically the opposite of jsonschema2pojo). It might be worth playing with some of these Jackson features to see if you can find something that fits your needs better than jsonschema2pojo. I've seen this question before (in relation to this project and json schema in general) so I have considered exploring this as a possible extension/alternative/complementary project.

@joelittlejohn
Copy link
Owner Author

From sridha...@gmail.com on January 18, 2012 21:48:07
@joe : Overall it is looking good, I was able to get it working with the example (address schema) .However I was hoping to use this tool to generate the Pojos for my json after may be i can get my schema (you are right jackson provides the other way around JSONSchema from pojos)

I found this useful and interesting, online pojo generator.
http://jsongen.byingtondesign.com/
I wish this was commandline :)

I haven't tried yet but may be I can use these Pojos generated by this online tool( make changes as necessary and use Jackson to generate schema) apply that schema to jsonschema2pojo

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