-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
- Loading branch information
Showing
1 changed file
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Json [![](https://jitpack.io/v/Petersburg2020/Json.svg)](https://jitpack.io/#Petersburg2020/Json) | ||
|
||
This is a Java Project that helps to manage ".json", ".pis" and other associated documents. | ||
|
||
# How To Add Json To Gradle | ||
|
||
You can add Data to your Java Project by following the steps below: | ||
|
||
# Step 1. | ||
Add the JitPack repository to your build file. | ||
|
||
Add it in your root build.gradle at the end of repositories: | ||
|
||
![add jitpack to build](https://user-images.githubusercontent.com/61753269/209490940-9d9a9925-3137-4212-b9d2-d49c5c15a55e.png) | ||
|
||
# Step 2. | ||
Add the dependency: | ||
|
||
![add json](https://user-images.githubusercontent.com/61753269/209552945-73d5d855-2583-4929-bb3a-06c5188c842f.png) | ||
|
||
Change Tag to the latest version of this Project (Jitpack) | ||
|
||
# How to Use Json | ||
Initiate Json using the various Json options listed below: | ||
|
||
a. All packages in Json | ||
|
||
![json packages](https://user-images.githubusercontent.com/61753269/209553106-95a21d47-709e-4c58-88f4-4d28a881b958.png) | ||
|
||
b. All objects in json package | ||
|
||
![json objects](https://user-images.githubusercontent.com/61753269/209554047-df928161-b8a0-4435-9ebe-8e569760626c.png) | ||
|
||
c. All objects in pis package | ||
|
||
![pis objects](https://user-images.githubusercontent.com/61753269/209553457-c1063e0b-4039-41e9-a5a8-922c052be4ef.png) | ||
|
||
This is how to initiate it; using the Java syntax: | ||
|
||
a. Create the Writer: | ||
|
||
![Json – Main java Json main 12_26_2022 2_26_15 PM](https://user-images.githubusercontent.com/61753269/209553952-d3243dcf-b68f-4818-a60c-1279e22a1a4e.png) | ||
|
||
![Json – Main java Json main 12_26_2022 2_37_13 PM](https://user-images.githubusercontent.com/61753269/209554738-d8995c07-4fb2-4e2f-b4fe-4862c2d62f7d.png) | ||
|
||
b. Set the path | ||
|
||
c. Create the root storage | ||
|
||
d. Get the root object | ||
|
||
e. Add any key (String) - value (Any Object pair) | ||
|
||
N.B: Objects can be any of these: | ||
|
||
- int, | ||
- float, | ||
- long, | ||
- double, | ||
- Object, | ||
- List/JsonArray (Represents JsonArray), & | ||
- Map/JsonObject (Represents JsonObject) | ||
|
||
N.B: JsonElement is the superclass of JsonObject & JsonArray | ||
|
||
The full entation will soon be released. | ||
|
||
Stay tuned! |