Coder Social home page Coder Social logo

niem-json-spec's People

Contributors

cdmgtri avatar tomcarlson-ntac avatar tommysezsowhat avatar webb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

niem-json-spec's Issues

NIEM-JSON spec comment on Lax Conformance

Spec looks good.

Regarding the use of Lax conformance. "Lax conformance enables the use of vocabularies that are defined by NIEM schemas or IEPDs via linked data and linked open data methods. It establishes that exchanges with NIEM-conformant vocabularies use those vocabularies properly; this allows data to be more flexible, and to combine terms from NIEM-conformant vocabularies with terms from other vocabularies."

Is this intended to apply to adapter implementations to establish compatible exchanges? If so, please consider including an example to provide context to the readers. Also consider changing "Lax Conformance" to "Adaptive Conformance" or "Compatible Conformance".

Determine if JSON data requires a single root property

Does a valid JSON instance have to have a single top-level property? Or can it have multiple top-level properties? An XML document has to have a single XML element as the document element. A JSON instance could be an object that has multiple properties at the top level.

Do we require valid JSON to correspond to a single valid XML document with a single root element?

So far, we've said that the JSON-LD must correspond to valid XML, but we haven't said the lexical structure of the JSON had to correspond to the lexical structure of the XML.

Revised wording, corrected typos

  • section 2.3, para 3: Should be "The principal component of...", not "principle".

  • section 2.3: The first two definitions as quoted are obviously circular. We should include the NDR sentences about conforming to all the rules of the specification,

  • section 4.1, para 1: Second sentence should begin "For this reason..."

  • rule 4-2: Perhaps "this rule does not provide or require a translation algorithm from JSON to XML; it only requires that the equivalent XML document is somehow available". So far as we're concerned the tooth fairy could leave it under your pillow.

clarify "relevant" message descriptions.

Clarify that a message should conform to one or more message specifications that it's constructed to satisfy.

Text is currently "conform to the relevant message descriptions".

Issue derived from #16.

Consider attaching a context to an instance as part of a data normalization stage

We currently have literal-to-object conversion as a step for normalizing a JSON file to be conformant JSON-LD.

We don't want to require attaching contexts to runtime data, in most cases.

Consider expanding the literal-to-object conversion to be a stage for JSON-LD normalization, which would include literal-to-object conversion, as well attaching a context as provided my a message specification.

This may involve a new conformance target, for a de-normalized JSON instance.

See https://github.com/NIEM/NIEM-JSON-Spec/wiki/NIEM-JSON-normalization for an explanation.

Handle ordered content

We need to handle ordered contents somehow, long term.

JSON-LD and RDF have lists; we used to have sequence ID. We need to figure out how to bridge the two. Maybe "ordered" is a property of a an element ref, indicating that its ordered content implies a list.

External content conformance

Instead of presuming all external content is conforming, perhaps we could have a rule similar to XML Schema's strict/lax/skip conformance for wildcards.

  • strict: The JSON is NIEM-conforming if and only if there is a separate conformance test for all external content AND all external content satisfies the corresponding test

  • lax: The JSON is NIEM-conforming UNLESS there is a separate conformance test for some external content AND external content which fails that test

  • skip: Forget it, Jake, it's Chinatown

RDFS interpretation for NIEM XML?

rule 4-4: We don't have this RDFS-interpretation rule for NIEM XML. Do we need it in the NDR? Is it necessarily satisfied in XML?

Add Audience section

1.1 Audience
The primary target of this guidance is the tool developer implementing tools to generate JSON instances (messages) that conform with the NIEM.

Developers looking to develop NIEM message specifications (IEPDs) including JSON representations, should refer instead to the Non-Normative Guidance in Using NIEM with JSON document.

Consider if literal-to-object conversion should assign simple types

Literal-to-object conversion turns something like:

{
  "nc:PersonFullName" : "Sherlock Holmes"
}

Into

{
  "nc:PersonFullName" : { "rdf:value": "Sherlock Holmes" }
}

Should it go a step farther, by assigning type information where appropriate? Like properly handling dates? For example, turn this:

{
  "nc:Date": "1970-01-01"
}

…into this:

{
  "nc:Date": {
    "rdf:value": {
      "@value": "1970-01-01",
      "@type": "xs:date"
    }
  }
}

Incorrect JSON-LD in Figure 5-4

Figure 5-4 is incorrectly referencing rdf:type. Look to figure 5-9 for correct structure.

{
  "nc:PersonFullName" : {
    "rdf:value": "Sherlock Holmes",
    "rdf:type": "xs:string"
  }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.