1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.common.jute.json;
17
18 import java.io.File;
19 import java.io.IOException;
20 import java.net.URL;
21
22 import com.google.common.io.ByteSink;
23 import com.google.common.io.ByteSource;
24
25 public interface JsonService {
26
27 <T> T readString(String json, Class<T> type);
28
29 <T> T read(File file, Class<T> type) throws IOException;
30
31 <T> T read(ByteSource source, Class<T> type) throws IOException;
32
33 <T> T read(String url, Class<T> type) throws IOException;
34
35 <T> T read(URL url, Class<T> type) throws IOException;
36
37 <T> String writeString(T reference);
38
39 <T> void write(File file, T reference) throws IOException;
40
41 <T> void write(ByteSink sink, T reference) throws IOException;
42
43 }