CustomJSONWriter.java
2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* org.apache.sling.commons.json.JSONException
* org.apache.sling.commons.json.io.JSONWriter
*/
package com.adobe.aemds.guide.utils;
import com.adobe.aemds.guide.service.GuideException;
import java.io.Writer;
import java.util.Stack;
import org.apache.sling.commons.json.JSONException;
import org.apache.sling.commons.json.io.JSONWriter;
public class CustomJSONWriter
extends JSONWriter {
public Stack<String> objectStack = new Stack();
public CustomJSONWriter(Writer w) {
super(w);
}
public CustomJSONWriter array() {
try {
return (CustomJSONWriter)super.array();
}
catch (Exception e) {
throw new GuideException(e);
}
}
public CustomJSONWriter endArray() {
try {
return (CustomJSONWriter)super.endArray();
}
catch (Exception e) {
throw new GuideException(e);
}
}
public CustomJSONWriter endObject() {
try {
return (CustomJSONWriter)super.endObject();
}
catch (Exception e) {
throw new GuideException(e);
}
}
public CustomJSONWriter key(String s) {
try {
return (CustomJSONWriter)super.key(s);
}
catch (Exception e) {
throw new GuideException(e);
}
}
public CustomJSONWriter object() {
try {
return (CustomJSONWriter)super.object();
}
catch (Exception e) {
throw new GuideException(e);
}
}
public CustomJSONWriter value(boolean b) {
try {
return (CustomJSONWriter)super.value(b);
}
catch (Exception e) {
throw new GuideException(e);
}
}
public CustomJSONWriter value(double d) {
try {
return (CustomJSONWriter)super.value(d);
}
catch (Exception e) {
throw new GuideException(e);
}
}
public CustomJSONWriter value(long l) {
try {
return (CustomJSONWriter)super.value(l);
}
catch (Exception e) {
throw new GuideException(e);
}
}
public CustomJSONWriter value(Object o) {
try {
return (CustomJSONWriter)super.value(o);
}
catch (Exception e) {
throw new GuideException(e);
}
}
}