From 1dce20f7eee56166ac61798ca26eeb323dc8f012 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 17 Jun 2016 00:52:38 -0700 Subject: altoslib: Get rid of manual JSON encoding stuff Now that the reflective JSON stuff is working, we can delete all of the manual code. Signed-off-by: Keith Packard --- altoslib/AltosMag.java | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'altoslib/AltosMag.java') diff --git a/altoslib/AltosMag.java b/altoslib/AltosMag.java index 8d40bc60..5864529f 100644 --- a/altoslib/AltosMag.java +++ b/altoslib/AltosMag.java @@ -20,7 +20,7 @@ package org.altusmetrum.altoslib_11; import java.util.concurrent.*; import java.io.*; -public class AltosMag implements Cloneable, AltosJsonable { +public class AltosMag implements Cloneable { public int along; public int across; public int through; @@ -93,28 +93,4 @@ public class AltosMag implements Cloneable, AltosJsonable { break; } } - - public AltosJson json() { - AltosJson j = new AltosJson(); - - j.put("along", along); - j.put("across", across); - j.put("through", through); - return j; - } - - public AltosMag(AltosJson j) { - this(); - - along = j.get_int("along", along); - across = j.get_int("across", across); - through = j.get_int("through", through); - } - - public static AltosMag fromJson(AltosJson j, AltosMag def) { - if (j == null) - return def; - - return new AltosMag(j); - } } -- cgit v1.2.3