Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: replace fastjson to jackson #133

Merged
merged 2 commits into from
Sep 21, 2020
Merged

chore: replace fastjson to jackson #133

merged 2 commits into from
Sep 21, 2020

Conversation

xcaspar
Copy link
Member

@xcaspar xcaspar commented Sep 18, 2020

Signed-off-by: xcaspar x.caspar@gmail.com

Describe what this PR does / why we need it

Does this pull request fix one issue?

Describe how you did it

Describe how to verify it

Special notes for reviews

Signed-off-by: xcaspar <x.caspar@gmail.com>
@xcaspar xcaspar added the type/enhancement New feature or request label Sep 18, 2020
@xcaspar xcaspar added this to the v0.7.0 milestone Sep 18, 2020
@xcaspar xcaspar requested a review from tiny-x September 18, 2020 06:00
Copy link
Member

@tiny-x tiny-x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be use ObjectMapper singleton and lightweight ObjectReader ObjectWrite

@@ -188,7 +191,8 @@ private Request getRequestFromParams(HttpServletRequest httpServletRequest) {

private Request getRequestFromBody(HttpServletRequest httpServletRequest) throws IOException {
ServletInputStream inputStream = httpServletRequest.getInputStream();
Map<String, String> parameters = JSON.parseObject(inputStream, Map.class);
MapType mapType = TypeFactory.defaultInstance().constructMapType(HashMap.class, String.class, String.class);
Map<String, String> parameters = new ObjectMapper().readValue(inputStream, mapType);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be use ObjectMapper singleton and lightweight ObjectReader ObjectWrite

Signed-off-by: xcaspar <x.caspar@gmail.com>
@tiny-x tiny-x merged commit 3d36397 into master Sep 21, 2020
@xcaspar xcaspar deleted the replace-fastjson branch September 21, 2020 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants