fork(2) download
  1. <?php
  2.  
  3. $json = '{
  4. "participants": [
  5. {
  6. "name": "Jan Pikusa"
  7. },
  8. {
  9. "name": "Tom W\u00c3\u00b3jcik"
  10. }
  11. ],
  12. "messages": [
  13. {
  14. "sender_name": "Tom W\u00c3\u00b3jcik",
  15. "timestamp_ms": 1611462517399,
  16. "content": "No a jak \u00f0\u009f\u0098\u0083",
  17. "type": "Generic",
  18. "is_unsent": false
  19. },
  20. {
  21. "sender_name": "Jan Pikusa",
  22. "timestamp_ms": 1611450627564,
  23. "content": "Ale fart mrrrr\u00e2\u009d\u00a4\u00ef\u00b8\u008f",
  24. "type": "Share",
  25. "is_unsent": false
  26. }
  27. ]}';
  28.  
  29. $array = mb_convert_encoding(json_decode($json, true), 'Windows-1252', 'UTF-8');
  30.  
  31. print_r($array);
  32.  
Success #stdin #stdout 0.02s 24376KB
stdin
Standard input is empty
stdout
Array
(
    [participants] => Array
        (
            [0] => Array
                (
                    [name] => Jan Pikusa
                )

            [1] => Array
                (
                    [name] => Tom Wójcik
                )

        )

    [messages] => Array
        (
            [0] => Array
                (
                    [sender_name] => Tom Wójcik
                    [timestamp_ms] => 1611462517399
                    [content] => No a jak 😃
                    [type] => Generic
                    [is_unsent] => 
                )

            [1] => Array
                (
                    [sender_name] => Jan Pikusa
                    [timestamp_ms] => 1611450627564
                    [content] => Ale fart mrrrr❤️
                    [type] => Share
                    [is_unsent] => 
                )

        )

)