1 |
|
package org.europa.together.business; |
2 |
|
|
3 |
|
import org.europa.together.exceptions.JsonProcessingException; |
4 |
|
import java.util.List; |
5 |
|
import org.apiguardian.api.API; |
6 |
|
import static org.apiguardian.api.API.Status.STABLE; |
7 |
|
import org.springframework.stereotype.Component; |
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
@param |
13 |
|
|
14 |
|
@API(status = STABLE, since = "3.0", consumers = "JacksonJsonTools") |
15 |
|
@Component |
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
16 |
|
public interface JsonTools<T> { |
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
@API(status = STABLE, since = "3.0") |
22 |
|
String FEATURE_ID = "CM-15"; |
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
@param |
28 |
|
@return |
29 |
|
@throws |
30 |
|
|
31 |
|
@API(status = STABLE, since = "3.0") |
32 |
|
String serializeAsJsonObject(T object) |
33 |
|
throws JsonProcessingException; |
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
@param |
39 |
|
@param |
40 |
|
@return |
41 |
|
@throws |
42 |
|
@throws |
43 |
|
|
44 |
|
@API(status = STABLE, since = "3.0") |
45 |
|
T deserializeJsonAsObject(String json, Class<T> object) |
46 |
|
throws JsonProcessingException, ClassNotFoundException; |
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
@param |
52 |
|
@return |
53 |
|
@throws |
54 |
|
@throws |
55 |
|
|
56 |
|
@API(status = STABLE, since = "3.0") |
57 |
|
List<T> deserializeJsonAsList(String json) |
58 |
|
throws JsonProcessingException, ClassNotFoundException; |
59 |
|
|
60 |
|
} |