frankframework / frankframework/frankframework

Xml2Json: should not collect JSON result in memory

Open
#8,493 0 comments 0 reactions 0 assignees View on GitHub
Performance Technical Debt
Dominant language
Java
Stars
167
Forks
87
Avg merge
1d 2h
Merged PRs (30d)
206

Description

Converting an XML to JSON collects the entire JSON output in memory first, before writing out the JSON.

If possible we should instead write the JSON to a MessageBuilder directly so that memory usage is reduced and garbage collection overhead minimized.

As part of this change, the JsonWriter class should get an option to format the JSON that is being written to keep a readable output, like the current JsonDocumentContainer now produces.

When done we can remove the JsonDocumentContainer/JsonElementContainer classes, because they are not used anywhere else.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.