[ create a new paste ] login | about

Link: http://codepad.org/tK4zIJj1    [ raw code | output | fork ]

PHP, pasted on Mar 28:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

var_dump(json_decode('

{"serverTimestamp":"Wed, 28 Mar 2012 11:40:26 +0000",
  "users": [{
    "userId": "username",
    "statuscode":0,
    "floatingPL":-1000.00,
    "balance":50000,
    "equity":40000,
    "freeMargin":4000,
    "marginInUse":30.11,
    "currency":"EUR",
    "closedPL":5692.85,
    "creditFacility":0,
    "mostRecentUpload":"Wed, 28 Mar 2012 11:39:58 +0000"
}]}
'));


Output:
object(stdClass)#1 (2) {
  ["serverTimestamp"]=>
  string(31) "Wed, 28 Mar 2012 11:40:26 +0000"
  ["users"]=>
  array(1) {
    [0]=>
    object(stdClass)#2 (11) {
      ["userId"]=>
      string(8) "username"
      ["statuscode"]=>
      int(0)
      ["floatingPL"]=>
      float(-1000)
      ["balance"]=>
      int(50000)
      ["equity"]=>
      int(40000)
      ["freeMargin"]=>
      int(4000)
      ["marginInUse"]=>
      float(30.11)
      ["currency"]=>
      string(3) "EUR"
      ["closedPL"]=>
      float(5692.85)
      ["creditFacility"]=>
      int(0)
      ["mostRecentUpload"]=>
      string(31) "Wed, 28 Mar 2012 11:39:58 +0000"
    }
  }
}


Create a new paste based on this one


Comments: