File tree Expand file tree Collapse file tree
model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616
1717package com .basistech .rosette .apimodel .recordsimilarity .records ;
1818
19- import java .util .LinkedHashMap ;
20- import java .util .Map ;
21-
2219import com .fasterxml .jackson .annotation .JsonCreator ;
2320import com .fasterxml .jackson .annotation .JsonFormat ;
2421import com .fasterxml .jackson .annotation .JsonValue ;
@@ -49,23 +46,7 @@ public String toString() {
4946
5047 @ JsonValue
5148 public Object getData () {
52- if (data == null ) {
53- return "" ;
54- } else {
55- if (data .isObject ()) {
56- Map <String , JsonNode > map = new LinkedHashMap <>();
57- data .fields ().forEachRemaining (fieldEntry -> map .put (fieldEntry .getKey (), fieldEntry .getValue ()));
58- try {
59- ObjectMapper mapper = new ObjectMapper ();
60- String jsonString = mapper .writeValueAsString (map );
61- return mapper .readTree (jsonString );
62- } catch (JsonProcessingException e ) {
63- return this .data ;
64- }
65- }
66- // if given input is not an Object node, it's a String so return it
67- return this .data ;
68- }
49+ return this .data ;
6950 }
7051
7152 //compare the content of the String form of the UnknownFields' data
You can’t perform that action at this time.
0 commit comments