summaryrefslogtreecommitdiff
path: root/altoslib/AltosMag.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-06-17 00:52:38 -0700
committerKeith Packard <keithp@keithp.com>2016-06-17 01:03:40 -0700
commit1dce20f7eee56166ac61798ca26eeb323dc8f012 (patch)
treee7f64afa79991e10d0b7aa680e98af3ce96a62bb /altoslib/AltosMag.java
parent7175774c4f60ed3efd54417f2035b50ea0108c7b (diff)
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 <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosMag.java')
-rw-r--r--altoslib/AltosMag.java26
1 files changed, 1 insertions, 25 deletions
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);
- }
}