//         I think I figured it out,

        

//         1: Add this to your di config:

        

//         'Zend\View\Renderer\JsonRenderer' => array(

//            'parameters' => array(

//                  'mergeUnnamedChildren' => true

//            )

//         ),

        

//         Bugfixes:

        

//         2: Make sure line 60 in Zend\View\Variables reads:

        

//         ArrayObject::ARRAY_AS_PROPS,

        

//         3: Update Zend\View\Renderer\JsonRenderer in the recurseModel
method for loop

        

//         from:

        

//         if ($captureTo) {

//         // Capturing to a specific key

//         $values[$captureTo] = $childValues;

//         } elseif ($mergeChildren) {

//         // Merging values with parent

//         $values = array_replace_recursive($values, $childValues);

//         }

        

//         to:

        

//         if ($mergeChildren) {

//         // Merging values with parent

//         $values = array_replace_recursive($values, $childValues);

//         } else {

//         // Capturing to a specific key

//         $values[$captureTo] = $childValues;

//         }

        

//         If I understand the intended use properly, this should work. I've
submitted the //following PR: https://github.com/zendframework/zf2/pull/899

      

It works for me. Good effort!

 

  _____  

If you reply to this email, your message will be added to the discussion
below:

http://zend-framework-community.634137.n4.nabble.com/ZF2-contextSwitch-to-js
on-tp4418147p4454381.html 

To unsubscribe from ZF2 contextSwitch to json ?, click here
<http://zend-framework-community.634137.n4.nabble.com/template/NamlServlet.j
tp?macro=unsubscribe_by_code&node=4418147&code=eHVldGluZ0BiYW9zaWdodC5jb218N
DQxODE0N3wxNDMxNjE1Njk4> .
 <http://zend-framework-community.634137.n4.nabble.com/template/NamlServlet.
jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.nam
l.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.
view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aem
ail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3A
email.naml> NAML 



--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/ZF2-contextSwitch-to-json-tp4418147p4456353.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to