Skip to content

Commit 8696626

Browse files
authored
1.2.2 lambda-java-core release (#367)
* 1.2.2 lambda-java-core release
1 parent ca1e998 commit 8696626

File tree

3 files changed

+44
-1
lines changed

3 files changed

+44
-1
lines changed

aws-lambda-java-core/RELEASE.CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
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))

aws-lambda-java-core/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
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 numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+
}

0 commit comments

Comments
 (0)