zend-json icon indicating copy to clipboard operation
zend-json copied to clipboard

Adding the new "forceObject" flag

Open JohnWhitleyEkkoSense opened this issue 6 years ago • 2 comments

Adding the new "forceObject" flag to be passed to the encoder in the options in the manner of ['forceObject' => true,] . This then forces the encoder output to encode to an object rather than an array. This implementation assumes all nested arrays to be forced to be objects in the manner of JSON_FORCE_OBJECT.

This is the pull request for the conversation outlined in #27

JohnWhitleyEkkoSense avatar Sep 23 '19 08:09 JohnWhitleyEkkoSense

This repository has been closed and moved to laminas/laminas-json; a new issue has been opened at https://github.com/laminas/laminas-json/issues/1.

weierophinney avatar Dec 31 '19 21:12 weierophinney

This repository has been moved to laminas/laminas-json. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:

  • Squash all commits in your branch (git rebase -i origin/{branch})
  • Make a note of all changed files (`git diff --name-only origin/{branch}...HEAD
  • Run the laminas/laminas-migration tool on the code.
  • Clone laminas/laminas-json to another directory.
  • Copy the files from the second bullet point to the clone of laminas/laminas-json.
  • In your clone of laminas/laminas-json, commit the files, push to your fork, and open the new PR. We will be providing tooling via laminas/laminas-migration soon to help automate the process.

weierophinney avatar Dec 31 '19 21:12 weierophinney