Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7

Thread: Info reg JSON

  1. #1
    New to the CF scene
    Join Date
    Nov 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Info reg JSON

    Hi am a new bee to this JSON. What is this Json? is it a communication between java and Flash.?

  • #2
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph

  • #3
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    I'm about 94% certain that JSON is an ecma standard.
    Moving to JS forums.

    Edit:
    Awesome, it even has a forum of its own
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  • #4
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    It's not an ECMA standard, though it's built on one and will be standardised further in one. It's basically the object, array, number, boolean, string and null literal syntaces from ECMAScript/JavaScript when removed from the actual programming language to use as a data representation format. It looks like some special handling of it it will be a normative part of ECMAScript 3.1.
    Last edited by liorean; 11-11-2008 at 08:37 AM.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #5
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,373
    Thanks
    11
    Thanked 592 Times in 572 Posts
    it is a strict subset of object literal notation.
    extra rules in JSON not in JS:
    • no inline functions, no inline function calls, no custom "classes"
    • dates represented by ISO string instead of a Date Object
    • quoted key and string values: { "key" : "value" }
    • must use double (") quotes, while JS can accept single (')
    • anonymous in nature, JS objects can be named variable declarations
    • whitespace semi-enforced, JS is completely ignorant


    i am sure i've forgotten a few other points, but those are the major ones that jump out at me.
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/9/03) IE7:0.1, IE8:4.6, IE11:9.1, IE9:3.1, IE10:3.0, FF:17.2, CH:46, SF:11.4, NON-MOUSE:38%

  • #6
    New Coder
    Join Date
    Nov 2008
    Location
    New Delhi,India
    Posts
    26
    Thanks
    1
    Thanked 3 Times in 3 Posts

    json

    JSON is a data interchange format which is used to pass data between client and server using javascript/ajax. basically xml and json do the same thing, though there are many differences.

    - json is lightweight (try comparing json to xml for same amount of data)
    -json is native object form in javascript [ structure of a json and a javascript object is same.

    an object in javascript:
    var obj = {"name": "xyz","age","25"}
    OR
    var obj = {};
    obj.name = "xyz";
    obj.age = 25;

    json format:

    {
    "name": "xyz",
    "age" : "25"
    }

    You just have to parse a json string and it is ready to be used as an object in javascript. No heavy code for parsing xml and all.
    If interested you can see more at: http://www.vijayjoshi.org/2008/08/20...in-javascript/

  • #7
    New to the CF scene
    Join Date
    Nov 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    JSON is a simple, and elegant data format for the exchange of information between the browser and server.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •