GitHub user JulioCCBUcuenca opened a pull request:

    https://github.com/apache/any23/pull/82

    Use RDF4J writer to return JSON-LD outputs.

    User JSON-LD as a default JSONWritter.
    
    Having the statement:
    ```xml
    <http://sub/1> <http://pred/1> "123"^^<http://datatype> <http://graph/1>.
    ```
    
    Before using the default RDF4J writer:
    ```json
    [
      {
        "type": "uri",
        "value": "http://sub/1";
      },
      "http://pred/1";,
      {
        "type": "literal",
        "value": "123",
        "lang": null,
        "datatype": "http://datatype";
      },
      "http://graph/1";
    ]
    ```
    
    Now, using the RDF4J writer:
    ```json
    [
      {
        "@graph": [
          {
            "@id": "http://sub/1";,
            "http://pred/1": [
              {
                "@type": "http://datatype";,
                "@value": "123"
              }
            ]
          }
        ],
        "@id": "http://graph/1";
      }
    ]
    ```
    
    I am wondering about name conventions and some drawback compatibility. 
    - Should we rename the classes `JSONWriter` to `JSONLDWriter` and 
`JSONWriterFactory` to `JSONLDWriterFactory`. 
    - When using the REST API, should we use `jsonld` as output format  instead 
of `json`.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/JulioCCBUcuenca/any23 ANY23-231

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/any23/pull/82.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #82
    
----

----


---

Reply via email to