| 1 | package json; |
| 2 | |
| 3 | import shared.Tools; |
| 4 | |
| 5 | public class JsonLiteral { |
| 6 | |
| 7 | public JsonLiteral(String s_){ |
| 8 | s=s_; |
| 9 | } |
| 10 | |
| 11 | public JsonLiteral(double value, int decimals){ |
| 12 | s=Tools.format("%."+decimals+"f", value); |
| 13 | } |
| 14 | |
| 15 | @Override |
| 16 | public String toString(){return s;} |
| 17 | |
| 18 | private final String s; |
| 19 | |
| 20 | } |