Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2ec5720

Browse files
committed
main class parse 메소드 추가
1 parent c5c55a8 commit 2ec5720

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

‎.idea/workspace.xml

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/com/inzapp/jsonToSqlParser/JsonToSqlParser.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.inzapp.jsonToSqlParser.config.Config;
44
import com.inzapp.jsonToSqlParser.core.Parser;
5+
import org.json.JSONException;
56
import org.json.JSONObject;
67

78
import java.io.BufferedReader;
@@ -46,6 +47,14 @@ public static void main(String[] args){
4647
System.out.println("parse success");
4748
}
4849

50+
public String parse(String jsonString) {
51+
try {
52+
return new Parser().parse(new JSONObject(jsonString));
53+
} catch (Exception e) {
54+
return null;
55+
}
56+
}
57+
4958
private JSONObject readJsonFromFile(String fileName) {
5059
try {
5160
BufferedReader br = new BufferedReader(new FileReader(fileName));

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /