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

[FEATURE] Add option "ifEmptyUnsetKey" to JSON cObject #650

Merged
merged 3 commits into from
Oct 2, 2023

Conversation

bmack
Copy link
Contributor

@bmack bmack commented Sep 14, 2023

This TypoScript option works similar to "ifEmptyReturnNull", however, the option uses the unset() feature to actually remove the key from the json output instead of setting this to null.

The code checks for "" and an explicit "false" (bool) when using the cObject = BOOL

Fixes: #649

This TypoScript option works similar to "ifEmptyReturnNull",
however, the option uses the unset() feature to actually remove
the key from the json output instead of setting this to null.

The code checks for "" and an explicit "false" (bool) when using
the cObject = BOOL

Fixes: TYPO3-Headless#649
@coveralls
Copy link

coveralls commented Sep 14, 2023

Pull Request Test Coverage Report for Build 6379669992

  • 1 of 2 (50.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 62.911%

Changes Missing Coverage Covered Lines Changed/Added Lines %
Classes/ContentObject/JsonContentObject.php 1 2 50.0%
Totals Coverage Status
Change from base Build 6379652035: -0.02%
Covered Lines: 804
Relevant Lines: 1278

💛 - Coveralls

@lukaszuznanski lukaszuznanski added the enhancement New feature or request label Sep 14, 2023
@lukaszuznanski lukaszuznanski merged commit bd021af into TYPO3-Headless:master Oct 2, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make some fields of JSON cObject optional
3 participants