Skip to content

Commit 71a1b19

Browse files
committed
Reader
1 parent 146aa9b commit 71a1b19

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/main/java/com/hmtmcse/jtfutil/test/TexFileTest.java

+4
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ public static void jsonTest(){
4444
linkedHashMap = jsonReadWrite.readJsonFileToMap("test-data/user-test.json");
4545
TMUtil.printMap(linkedHashMap);
4646

47+
textFileData = readWriteTextFile.fileToString("test-data/test-customer.json");
48+
TestCustomer testCustomer = jsonReadWrite.readJsonStringAsKlass(textFileData.text, TestCustomer.class);
49+
testCustomer = jsonReadWrite.readJsonFileAsKlass("test-data/test-customer.json", TestCustomer.class);
50+
4751
TMUtil.print("End");
4852

4953
} catch (TextFileException e) {

test-data/test-customer.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"firstName": "Touhid",
3+
"lastName": "Mia",
4+
"age": 12
5+
}

0 commit comments

Comments
 (0)