File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
src/test/java/com/github/underscore/lodash Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1041,6 +1041,26 @@ public void stackoverflow5() {
10411041 assertEquals ("{getRolesRequest={Type=ABC}}" , jsonData .toString ());
10421042 }
10431043
1044+ @ Test
1045+ public void stackoverflow6 () {
1046+ // https://stackoverflow.com/questions/59585708/getting-null-pointer-while-reading-the-fileds-from-json-to-pojo
1047+ String jsonData = "{\n "
1048+ + " \" TEST\" : {\n "
1049+ + " \" NAME\" : \" PART_TRAN\" ,\n "
1050+ + " \" VERSION\" : \" 9.0\" ,\n "
1051+ + " \" ID\" : \" ----\" ,\n "
1052+ + " \" SEGMENT\" : {\n "
1053+ + " \" TYPE\" : \" R\" ,\n "
1054+ + " \" CLIENT_ID\" : \" ----\" ,\n "
1055+ + " \" UN_NUM\" : \" UN\" \n "
1056+ + " }"
1057+ + " }"
1058+ + "}" ;
1059+ Map <String , Object > jsonObject = U .fromJsonMap (jsonData );
1060+ assertEquals ("R" , U .<String >get (jsonObject , "TEST.SEGMENT.TYPE" ));
1061+ assertEquals ("UN" , U .<String >get (jsonObject , "TEST.SEGMENT.UN_NUM" ));
1062+ }
1063+
10441064 @ SuppressWarnings ("unchecked" )
10451065 @ Test
10461066 public void sqlru1 () {
You can’t perform that action at this time.
0 commit comments