Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1878 | jmachado | 1 | package com.owlike.genson; |
2 | |||
3 | import java.io.IOException; |
||
4 | |||
5 | import com.owlike.genson.stream.ObjectReader; |
||
6 | |||
7 | /** |
||
8 | * Deserializers handle deserialization by reading data form {@link com.owlike.genson.stream.ObjectReader |
||
9 | * ObjectReader} and constructing java objects of type T. Genson Deserializers work like classic |
||
10 | * deserializers from other libraries. |
||
11 | * |
||
12 | * @param <T> the type of objects this deserializer can deserialize. |
||
13 | * @author eugen |
||
14 | * @see Converter |
||
15 | */ |
||
16 | public interface Deserializer<T> { |
||
17 | /** |
||
18 | * @param reader used to read data from. |
||
19 | * @param ctx the current context. |
||
20 | * @return an instance of T or a subclass of T. |
||
21 | * @throws com.owlike.genson.JsonBindingException |
||
22 | * @throws com.owlike.genson.stream.JsonStreamException |
||
23 | */ |
||
24 | public T deserialize(ObjectReader reader, 5+0%2Fdocs%2Fapi+Context">Context ctx) throws 1.5.0/docs/api/java/lang/Exception.html">Exception; |
||
25 | } |