JSON schema ??? SQL-Binding ??? HTML-Form-Binding ???

Discussion in 'Javascript' started by Jörg Weule, Nov 26, 2011.

  1. Hello,

    is there anything like an JSON schema file format?

    It would be nice to describe the structure of the objects to transfer
    between the Browser and the php-backend.

    Any methods to extend a SQL-binding and/or HTML-bindung is apreciated:
    SQL will be used to store the data at tables and HTML form elements are
    used to edit the data fields additional to the node tree.

    Any ideas?

    With kind regards

    Jörg Weule, Nov 26, 2011
    1. Advertisements

  2. I beg your pardon?

    BTW, your Question Mark key is borken.

    Thomas 'PointedEars' Lahn, Nov 26, 2011
    1. Advertisements

  3. Json objects are like XML very flexible. Is there a file format to
    describe a subset with a specific structure like XMLSchema xsd-files ?
    Jörg Weule, Nov 26, 2011
  4. Thomas 'PointedEars' Lahn, Nov 26, 2011
  5. Jörg Weule, Nov 26, 2011
  6. Jörg Weule, Nov 26, 2011
  7. I beg your pardon?

    How can there be an *HTML* editor for *JSON Schema*? No, do not answer.

    You clearly have not learned yet how to ask smart questions.

    Thomas 'PointedEars' Lahn, Nov 26, 2011
  8. Thomas 'PointedEars' Lahn, Nov 26, 2011
  9. I'm looking for an HTML-editor to edit data respecting a given JSON schema.
    May be, ... Deusch ist meine Muttersprache ;-)
    There are Editors to edit data respecting a given XML-Schema! Is there a
    similar thing for JSON?
    Jörg Weule, Nov 26, 2011
  10. Jörg Weule

    Bart Lateur Guest

    I'll spell it in simple words for you. JSON is a data structure very
    much like Javascript. there is no trace of HTML in sight.

    So how can you expect to use an HTML editor to edit JSON?
    Bart Lateur, Nov 27, 2011
  11. Jörg Weule

    Arno Welzel Guest

    Jörg Weule, 2011-11-26 23:43:
    Why do you want to use an HTML(!) editor to edit JSON(!)?

    Arno Welzel, Nov 28, 2011
  12. Jörg Weule

    Jörg Weule Guest

    Because we have tinymce to edit html ;-)

    Jörg Weule, Nov 28, 2011
  13. TinyMCE is a platform independent web based Javascript HTML WYSIWYG
    editor control released as Open Source under LGPL by Moxiecode Systems
    AB. ...

    So it's not an html-editor to edit html, it's a javascript editor to edit

    I think that what you may mean is that you want an editor that runs in
    javascript which can be embedded on a web page and can edit a JSON Schema
    (whatever one of those is).


    Denis McMahon
    Denis McMahon, Nov 28, 2011
  14. I want an editor for JSON data respecting a given JSON schema like
    tinymce is respecting xhtml. A canonical binding to database tables
    would be nice to store the data at the web server.

    I'm running a website for a jazz club where each concert has one or more
    bands. Each band hat musicans, a text, some images and web links...
    Jörg Weule, Nov 29, 2011
  15. Jörg Weule

    Scott Sauyet Guest

    Such editors probably exist, although I've never come across one. But
    your requirements raise the question of whether you also would be
    better off with a document-oriented database such as Couch or Mongo.
    This might be cleaner than "a canonical binding to database tables."

    One other possibility, and one that I used in a somewhat similar
    circumstance, is to make the edit interface for a concert essentially
    be a sample page (or page section) in which the fields that need to be
    updated are visibly highlighted in some manner to make it clear that
    they can be edited. Then an edit-in-place technique would let the
    user edit the fields, immediately seeing the results. I had really
    good feedback from users for such a technique.

    -- Scott
    Scott Sauyet, Nov 29, 2011
  16. Yes, I still don't know what a "JSON schema" is though.

    JSON is a way of serialising a data object.

    Put your data object attributes in a suitable form presentation, and use
    javascript to serialise them.


    1) Generate a field layout that has suitable fields for the schema.

    2) Write javascript that can:

    (a) expand a JSON serialised data object to populate the fields
    (b) serialise data in the fields to a JSON data object
    (c) grow or shrink fields or collections of fields as needed to represent
    any array components of the data
    (d) ensure that data is of the correct type (eg numeric, character etc)


    Denis McMahon
    Denis McMahon, Nov 29, 2011
  17. You, too, would have known had you used a Web search engine before posting.
    No, it is an (object) data exchange format. Like XML, but with less
    overhead (and its own disadvantages instead, one of which JSON Schema
    is attempting to remove).

    Thomas 'PointedEars' Lahn, Nov 29, 2011
  18. Jörg Weule

    Arno Welzel Guest

    Thomas 'PointedEars' Lahn, 2011-11-29 23:59:
    What is the difference between "serialising a data object" and "(object)
    data exchange"?
    Arno Welzel, Nov 30, 2011
  19. Only that Thomas has to call it something different to me to suggest that
    I don't know what I'm talking about.


    Denis McMahon
    Denis McMahon, Nov 30, 2011
  20. You don't. JSON is about exchanging data, not serializing objects.
    There does not even need to be an original object for JSON.

    Thomas 'PointedEars' Lahn, Nov 30, 2011
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.