Eddymens (List page)

Last updated 2023-11-06 06:45:00

What Is A Data Exchange Format?


A data exchange format is an open format used to move information and data between two systems.

If computers were people from different countries who spoke different localized languages, data exchange formats would be a widespread language like English understood by many people around the world making the exchange of knowledge a lot more convenient.


JSON [→] is native (or following our initial analogy localized format to a programming language like Javascript [↗]) but understood by other programming languages like PHP [↗] where it's not native.

01: <?php 02: 03: $jsonString = '{"key": "value"}'; 04: 05: $PHPArray = json_decode($jsonString); 06: 07: var_dump($PHPArray); 08: 09: // output: 10: // object(stdClass)#1 (1) { 11: // ["key"]=> 12: // string(5) "value" 13: // } 14:

On line 5 PHP takes the JSON string and converts it to its native object structure.

Here is another article you might like 😊 "What Is A Method In Programming?"