From 6007165c17f349b81787657d104c967ef5dcc9ae Mon Sep 17 00:00:00 2001 From: Yeikel Date: Sat, 21 Oct 2023 00:10:42 -0400 Subject: [PATCH] docs: use syntax highlighting use syntax highlighting to improve the format of the readme --- README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 5f1f5b0..1db1f54 100644 --- a/README.md +++ b/README.md @@ -44,24 +44,24 @@ The org.json package can be built from the command line, Maven, and Gradle. The **Building from the command line** *Build the class files from the package root directory src/main/java* -```` +```shell javac org/json/*.java -```` +``` *Create the jar file in the current directory* -```` +```shell jar cf json-java.jar org/json/*.class -```` +``` *Compile a program that uses the jar (see example code below)* -```` +```shell javac -cp .;json-java.jar Test.java (Windows) javac -cp .:json-java.jar Test.java (Unix Systems) -```` +``` *Test file contents* -```` +```java import org.json.JSONObject; public class Test { public static void main(String args[]){ @@ -69,31 +69,31 @@ public class Test { System.out.println(jo.toString()); } } -```` +``` *Execute the Test file* -```` +```shell java -cp .;json-java.jar Test (Windows) java -cp .:json-java.jar Test (Unix Systems) -```` +``` *Expected output* -```` +```json {"abc":"def"} -```` +``` **Tools to build the package and execute the unit tests** Execute the test suite with Maven: -``` +```shell mvn clean test ``` Execute the test suite with Gradlew: -``` +```shell gradlew clean build test ```