== parser-json
:idprefix: id_ 
This addon provides *standalone* functionality, and *exports services* for use in other addons. 
It enables usage of JSR 353 - Java API for Json Processing in your addons
        
=== Depends on
[options="header"]
|===
|Addon |Exported |Optional
|resources
|yes
|yes

|simple
|yes
|no

|===

== Setup
This Addon requires the following installation steps.

=== Add configuration to pom.xml 
To use this addon, you must add it as a dependency in the *pom.xml* of your `forge-addon` classified artifact:
[source,xml]
----
<dependency>
   <groupId>org.jboss.forge.addon</groupId>
   <artifactId>parser-json</artifactId>
   <classifier>forge-addon</classifier>
   <version>${version}</version>
</dependency>
----
== Features
JsonResource for Json files:: 
Allows easy manipulation of json data
+
[source,java]
----
@Inject private ResourceFactory factory;
JsonResource resource = factory.createResource(new File("abc.json")).reify(JsonResource.class);
javax.json.JsonObject model = resource.getJsonObject();

....
JsonArray array = ...;
resource.setContents(array);

or 

JsonObject obj = ...;
resource.setContents(obj);

----
