File tree Expand file tree Collapse file tree 3 files changed +44
-1
lines changed
src/main/java/com/amazonaws/services/lambda/runtime Expand file tree Collapse file tree 3 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 1+ ### November 09, 2022
2+ ` 1.2.2 ` :
3+ - Added new ` CustomPojoSerializer ` interface
4+ - Removed unnecessary usage of public on interface methods (aws #172 )
5+
16### April 28, 2020
27` 1.2.1 ` :
38- Added missing XML namespace declarations to ` pom.xml ` file ([ #97 ] ( https://github.com/aws/aws-lambda-java-libs/issues/97 ) )
Original file line number Diff line number Diff line change 55
66 <groupId >com.amazonaws</groupId >
77 <artifactId >aws-lambda-java-core</artifactId >
8- <version >1.2.1 </version >
8+ <version >1.2.2 </version >
99 <packaging >jar</packaging >
1010
1111 <name >AWS Lambda Java Core Library</name >
Original file line number Diff line number Diff line change 1+ /* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. */
2+
3+ package com .amazonaws .services .lambda .runtime ;
4+
5+ import java .io .InputStream ;
6+ import java .io .OutputStream ;
7+
8+ import java .lang .reflect .Type ;
9+
10+ /**
11+ * Interface required to implement a custom plain old java objects serializer
12+ */
13+ public interface CustomPojoSerializer {
14+
15+ /**
16+ * Deserializes from input stream to plain old java object
17+ * @param input input stream
18+ * @param type plain old java object type
19+ * @return deserialized plain old java object of type T
20+ */
21+ <T > T fromJson (InputStream input , Type type );
22+
23+ /**
24+ * Deserializes from String to plain old java object
25+ * @param input input string
26+ * @param type plain old java object type
27+ * @return deserialized plain old java object of type T
28+ */
29+ <T > T fromJson (String input , Type type );
30+
31+ /**
32+ * Serializes plain old java object to output stream
33+ * @param value instance of type T to be serialized
34+ * @param output OutputStream to serialize plain old java object to
35+ * @param type plain old java object type
36+ */
37+ <T > void toJson (T value , OutputStream output , Type type );
38+ }
You can’t perform that action at this time.
0 commit comments