JSON API version: 20180813 converts empty xml elements to empty string in place of empty JSON Object

Open
#445 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java, json, xml

Research direction

Start by reproducing the reported empty XML element conversion with JSON API versions 20090211 and 20180813, using the code and outputs attached to the issue. Trace the conversion behavior and verify that the newer version produces the expected empty JSON object rather than an empty string.

Written by the indexing model from the issue text.

Description

Active discussion

Recently, for a requirement I had to move to version:20180813 of JSON API. Earlier I was using version:20090211 of JSON API. For empty xml element, version:20090211 returns empty JSON Object ({}); but version:20180813 returns empty string (""). This change has broke my working application.

Here is chunk of code:
org-json

Output with version: 20090211
version-20090211

Output with version: 20180813
version-20180813

Dominant language
Java
Stars
4.7k
Forks
2.6k
Avg merge
11d 18m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stleary/JSON-java

All issues in stleary/JSON-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.