rcockell
rcockell

Reputation: 92

Working with JSON without Maven

I am new at web programming study, specifically in Java and a issue came around during the development of an application I'm working on.

I have a Java Web Application(Spring MVC) that i have to consume some data (JSON) from the server in order to construct a chart.

The thing is that all the tutorials that i've seen on the internet mentioned that i have to use Maven dependencies to work with JSON, which my project doesn't support.

Can anyone point me a way to solve this problem without using Maven?

Thanks in advance.

Upvotes: 3

Views: 8511

Answers (3)

cool
cool

Reputation: 1786

Maven is just a dependency management solution. Actually it is more than that but in your context it is. So all you need to do is downloading necessary jars to lib directory and use them. Nothing else.

Upvotes: 4

virag
virag

Reputation: 582

Maven is simply used by projects for ease of building, reporting and dependency management. If your project does not use maven, you can simply import the jar files for all your dependencies into your project and use it.

So say, for e.g. to deal with JSON to Object and Object to JSON conversions for your project, you decide to use the Google Gson Library, you can simply download the zip or tar from here and extract the jar file and import it in your project as a Java library to use it. Maven would have only made it easy to maintain these dependencies but it is not mandatory.

Hope this helps!

Upvotes: 1

Reinard
Reinard

Reputation: 3654

There are several libraries out on the internet which allow you to handle JSON. You could easily find some on Google.

Two examples http://www.json.org/java/, http://www.oracle.com/technetwork/articles/java/json-1973242.html

Upvotes: 0

Related Questions