Feature #12442

Provide format.json ViewHelper

Added by Kevin Ulrich Moschallski over 2 years ago. Updated about 1 year ago.

Status:Resolved Start date:2011-01-21
Priority:Could have Due date:
Assignee:- % Done:

100%

Category:ViewHelpers
Target version:TYPO3 Flow Base Distribution - 1.1
Has patch:Yes
Votes: 1 (View)

Description

Hi,

i suggest to add type json to the escape viewhelper.

Sometime you want to render json output with fluid and not with an own json view. The problem is that fluid also uses json like syntax, so if you want to add an object to a json string you run into a problem.

Imagine adding a link with the link viewhelper. It returns a sting with double quotes which need to be escaped for json.

I simply added type json to the escape viewhelper which returns the $value json_encode()'ed.

Tell me what you think.

Regards,
Kevin

12442.patch (410 Bytes) Kevin Ulrich Moschallski, 2011-01-21 15:49

12442_v2.patch (785 Bytes) Kevin Ulrich Moschallski, 2011-01-21 15:50

Associated revisions

Revision 87ea437e
Added by Adrian Föder about 1 year ago

[FEATURE] Adds a format.json ViewHelper

Provide a ViewHelper that enables putting JSON out of an array or
object. Basically wraps PHP's native json_encode() method.

Change-Id: I4bb364220e9c8a96c8ec748eed8247b7f990b72e
Resolves: #12442
Releases: 1.2

Revision 50dcde38
Added by Adrian Föder about 1 year ago

[TASK] Disable escapingInterceptor in Format.Json ViewHelper

Because the provided ViewHelper children will never be put
through to the template but only be used for source value
retrieval, the escapingInterceptor gets disabled.

Change-Id: I56df6e8d24ef9d6b831af732cfffded55fa97636
Related: #12442
Releases: 1.2

History

Updated by Kevin Ulrich Moschallski over 2 years ago

Description added.

Updated by Sebastian Kurfuerst about 2 years ago

  • Category set to ViewHelpers
  • Priority changed from Should have to Could have
  • Has patch set to Yes

Updated by Bastian Waidelich almost 2 years ago

  • Subject changed from Add type json to escape viewhelper to Provide format.json ViewHelper

Note: The escape ViewHelper will be deprecated in the next version (see #27628) so this functionality should be put in it's own format.json ViewHelper. I changed the subject of the issue accordingly

Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/8723

Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/8723

Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/8723

Updated by Karsten Dambekalns over 1 year ago

  • Target version set to 1.1

Updated by Gerrit Code Review about 1 year ago

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9462

Updated by Gerrit Code Review about 1 year ago

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11385

Updated by Gerrit Code Review about 1 year ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9462

Updated by Gerrit Code Review about 1 year ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9462

Updated by Gerrit Code Review about 1 year ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9462

Updated by Gerrit Code Review about 1 year ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9462

Updated by Gerrit Code Review about 1 year ago

Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9462

Updated by Adrian Föder about 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF