Skip to content

cybex-dev/JSONReadWriteExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReadMe

Description

This is a Java code example of how to read from, edit and write back to a JSON file.

Requirements

  • Java JDK +1_181 (with language level +8)
  • IntelliJ IDE
  • JSON Library found here, or look in the libs folder.

To setup libraries for IntelliJ

  1. Create a folder called 'whatever you want' or (appropriately named libs) in the module root (same folder where your src folder is in)
  2. Copy the library json-simple-1.1.1.jar into the folder (created above).
  3. In IntelliJ, go to that file in the Project Browser (Shortcut: Alt + 1)
  4. Right-click on the folder, and click on "Mark as Library" option.

You can then use any library/jar file in this folder as a library

How to use GitHub (or get this code onto your PC)

  • [Optional] Create an account (register a student account / ask them for an educational licence: free PRO version)

There are 3 options for you to use version control

  1. Download git version control software
  2. (Recommended) Downlaod git GUI like GitKraken, its the same as 1. but uses a GUI
  3. (Beginners to VCS/GIT) Simply download the repository as a ZIP file Master Branch zip, extract and open in IntelliJ
If you chose 1/2 above, then proceed below:
  1. Clone the repository:
    • Click Clone Repository (GUI) using link https://github.com/cybex-dev/JSONReadWriteExample.git, or
    • Using Git Bash
      • Windows button > search git bash, hit enter.
      • Use cd to browse to directory you want to copy repository to.
      • Then type in git clone https://github.com/cybex-dev/JSONReadWriteExample.git if using git in the cmd/terminal
  2. Open repository
    • (GUI), or type in cd .\JSONReadWriteExample, or
    • cmd/terminal (you can browse around here)
  3. Open the repository in IntelliJ

About

Example of how to read from a JSON file, edit JSON content and write back to a new JSON file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages