Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_OS
    • Fix Version/s: V4.0_WD01
    • Component/s: CSDL JSON
    • Labels:
      None

      Description

      Add a JSON version of the CSDL and metadata document. This seems like a natural feature to support since all other responses (including the metadata service responses) can be formatted using JSON.

        Attachments

          Activity

          Show
          ralfhandl Ralf Handl added a comment - - edited I've created an XSL transformation that converts V4 CSDL documents into a proposed "static" JSON format form $metadata: https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/examples/V4-CSDL-to-JSON.xsl Example results corresponding to the CSDL examples in Part 3, sections 16.1 and 16.2 are: https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/examples/csdl-16.1.json https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/examples/csdl-16.2.json created from https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/examples/csdl-16.1.xml https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/examples/csdl-16.2.xml A more sophisticated example: https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/examples/ExampleService.json created from https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/examples/ExampleService.edmx And an example with every construct I could think of: https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/examples/miscellaneous.json created from https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/examples/miscellaneous.xml
          Hide
          ralfhandl Ralf Handl added a comment -

          After talking to JavaScript programmers that would consume the parsed metadata I made the following changes:

          • hashes instead of arrays if multi-occurring child elements have a unique key (e.g. Namespace identifies schemas, Name identifies Schema children, Name identifies properties within a structured type, Name identifies function/action parameters)
          • lowerCamelCased names for CSDL elements and attributes (e.g. nullable, maxLength): more in sync with mainstream JavaScript naming conventions
          • pluralized names for multi-occuring CSDL elements (e.g. entityTypes, properties): more in sync with mainstream JavaScript naming conventions

          The links now lead to updated versions of the XSL transformation and example JSON files. In addition there is
          https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/examples/MetadataService.json
          created from
          https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/examples/MetadataService.edmx

          Show
          ralfhandl Ralf Handl added a comment - After talking to JavaScript programmers that would consume the parsed metadata I made the following changes: hashes instead of arrays if multi-occurring child elements have a unique key (e.g. Namespace identifies schemas, Name identifies Schema children, Name identifies properties within a structured type, Name identifies function/action parameters) lowerCamelCased names for CSDL elements and attributes (e.g. nullable, maxLength): more in sync with mainstream JavaScript naming conventions pluralized names for multi-occuring CSDL elements (e.g. entityTypes, properties): more in sync with mainstream JavaScript naming conventions The links now lead to updated versions of the XSL transformation and example JSON files. In addition there is https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/examples/MetadataService.json created from https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/examples/MetadataService.edmx
          Hide
          ralfhandl Ralf Handl added a comment -

          Fix Version now V4.0 as we've started a standards track document for it.

          Show
          ralfhandl Ralf Handl added a comment - Fix Version now V4.0 as we've started a standards track document for it.

            People

            • Assignee:
              Unassigned
              Reporter:
              matthew.borges Matthew Borges (Inactive)
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: