File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
java/src/main/java/org/astonbitecode/j4rs/api Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public interface Codec {
22
22
<T > T decode (String json , String className ) throws JsonCodecException ;
23
23
24
24
25
- String encode (Object obj ) throws JsonCodecException ;
25
+ < T > String encode (T obj ) throws JsonCodecException ;
26
26
27
27
28
28
Object [] decodeArrayContents (String json ) throws JsonCodecException ;
Original file line number Diff line number Diff line change 17
17
import org .astonbitecode .j4rs .api .JsonValue ;
18
18
19
19
public class JsonValueFactory {
20
- public static JsonValue create (Object obj ) {
20
+ public static < T > JsonValue create (T obj ) {
21
21
return obj != null ? new JsonValueImpl (obj ) : new NullJsonValueImpl ();
22
22
}
23
23
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ public class JsonValueImpl implements JsonValue {
27
27
@ SuppressWarnings ("unused" )
28
28
private String className ;
29
29
30
- JsonValueImpl (Object obj ) {
30
+ < T > JsonValueImpl (T obj ) {
31
31
this .jsonCodec = JsonCodecService .getJsonCodec ();
32
32
this .obj = obj ;
33
33
try {
You can’t perform that action at this time.
0 commit comments