File tree Expand file tree Collapse file tree 3 files changed +40
-3
lines changed
src/main/java/io/frictionlessdata/tableschema Expand file tree Collapse file tree 3 files changed +40
-3
lines changed Original file line number Diff line number Diff line change @@ -530,10 +530,19 @@ public static Field<?> forType(String type) {
530530 * @return String-serialized JSON Object containing the properties of this field
531531 */
532532 @ JsonIgnore
533+ @ Deprecated
533534 public String getJson (){
534- return JsonUtil . getInstance (). serialize ( this );
535+ return asJson ( );
535536 }
536537
538+ /**
539+ * Get the JSON representation of the Field.
540+ * @return String-serialized JSON Object containing the properties of this field
541+ */
542+ @ JsonIgnore
543+ public String asJson (){
544+ return JsonUtil .getInstance ().serialize (this );
545+ }
537546
538547 @ JsonIgnore
539548 public String getCastMethodName () {
Original file line number Diff line number Diff line change @@ -149,9 +149,23 @@ public final void validate(Table table) throws ForeignKeyException{
149149 }
150150
151151 }
152-
152+
153+ /**
154+ * Get the JSON representation of the ForeignKey.
155+ * @return String-serialized JSON Object containing the properties of this foreign key
156+ */
153157 @ JsonIgnore
158+ @ Deprecated
154159 public String getJson (){
160+ return asJson ();
161+ }
162+
163+ /**
164+ * Get the JSON representation of the ForeignKey.
165+ * @return String-serialized JSON Object containing the properties of this foreign key
166+ */
167+ @ JsonIgnore
168+ public String asJson (){
155169 return JsonUtil .getInstance ().serialize (this );
156170 }
157171
Original file line number Diff line number Diff line change @@ -107,9 +107,23 @@ public final void validate() throws ForeignKeyException{
107107 }
108108 }
109109 }
110-
110+
111+ /**
112+ * Get the JSON representation of the Reference.
113+ * @return String-serialized JSON Object containing the properties of this foreign key reference
114+ */
111115 @ JsonIgnore
116+ @ Deprecated
112117 public String getJson (){
118+ return asJson ();
119+ }
120+
121+ /**
122+ * Get the JSON representation of the Reference.
123+ * @return String-serialized JSON Object containing the properties of this foreign key reference
124+ */
125+ @ JsonIgnore
126+ public String asJson (){
113127 return JsonUtil .getInstance ().serialize (this );
114128 }
115129
You can’t perform that action at this time.
0 commit comments