Guest User

Untitled

a guest
May 23rd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. <?php
  2. class IndexController extends Zend_Controller_Action
  3. {
  4. public function indexAction()
  5. {
  6.  
  7. $data = '{"node_id":"977","identification":{"inactive_status":"off","locked_status":"on","node_name":"Budget Version 1","owner":"Dsfa","summary":""},"dates":{"startDate":"2010-03-10","endDate":"2010-11-27","calendars":[{"calendarName":"new Calendar1","selectedDates":[]}]},"productivity":{"workingHours":0,"availability":0,"productivity":0},"currencies":{"baseCurrency":"CAD","forex":[]}}';
  8. $put_data = Zend_Json::decode(Zend_Json::encode($data));
  9. Zend_Debug::dump($put_data);
  10.  
  11. $put_data = Zend_Json::decode($data);
  12. Zend_Debug::dump($put_data);
  13. exit;
  14.  
  15. }
  16.  
  17. }
  18.  
  19. outout:
  20. string(379) "{"node_id":"977","identification":{"inactive_status":"off","locked_status":"on","node_name":"Budget Version 1","owner":"Dsfa","summary":""},"dates":{"startDate":"2010-03-10","endDate":"2010-11-27","calendars":[{"calendarName":"new Calendar1","selectedDates":[]}]},"productivity":{"workingHours":0,"availability":0,"productivity":0},"currencies":{"baseCurrency":"CAD","forex":[]}}"
  21.  
  22. array(5) {
  23. ["node_id"] => string(3) "977"
  24. ["identification"] => array(5) {
  25. ["inactive_status"] => string(3) "off"
  26. ["locked_status"] => string(2) "on"
  27. ["node_name"] => string(16) "Budget Version 1"
  28. ["owner"] => string(4) "Dsfa"
  29. ["summary"] => string(0) ""
  30. }
  31. ["dates"] => array(3) {
  32. ["startDate"] => string(10) "2010-03-10"
  33. ["endDate"] => string(10) "2010-11-27"
  34. ["calendars"] => array(1) {
  35. [0] => array(2) {
  36. ["calendarName"] => string(13) "new Calendar1"
  37. ["selectedDates"] => array(0) {
  38. }
  39. }
  40. }
  41. }
  42. ["productivity"] => array(3) {
  43. ["workingHours"] => int(0)
  44. ["availability"] => int(0)
  45. ["productivity"] => int(0)
  46. }
  47. ["currencies"] => array(2) {
  48. ["baseCurrency"] => string(3) "CAD"
  49. ["forex"] => array(0) {
  50. }
  51. }
  52. }
Add Comment
Please, Sign In to add comment