Github user fpservant commented on a diff in the pull request:

    https://github.com/apache/jena/pull/139#discussion_r62686055
  
    --- Diff: jena-arq/src/main/java/org/apache/jena/riot/out/JsonLDWriter.java 
---
    @@ -79,26 +130,85 @@ public void write(OutputStream out, DatasetGraph 
dataset, PrefixMap prefixMap, S
             IO.flush(w) ;
         }
     
    -    private void serialize(Writer writer, DatasetGraph dataset, PrefixMap 
prefixMap, String baseURI) {
    -        final Map<String, Object> ctx = new LinkedHashMap<>() ;
    -        addProperties(ctx, dataset.getDefaultGraph()) ;
    -        addPrefixes(ctx, prefixMap) ;
    +    private JSONLD_FORMAT getOutputFormat() {
    +                   if ((RDFFormat.JSONLD_COMPACT_PRETTY.equals(format)) || 
(RDFFormat.JSONLD_COMPACT_FLAT.equals(format))) return JSONLD_FORMAT.COMPACT;
    +                   if ((RDFFormat.JSONLD_EXPAND_PRETTY.equals(format)) || 
(RDFFormat.JSONLD_EXPAND_FLAT.equals(format))) return JSONLD_FORMAT.EXPAND;
    +                   if ((RDFFormat.JSONLD_FLATTEN_PRETTY.equals(format)) || 
(RDFFormat.JSONLD_FLATTEN_FLAT.equals(format))) return JSONLD_FORMAT.FLATTEN;
    +                   if ((RDFFormat.JSONLD_FRAME_PRETTY.equals(format)) || 
(RDFFormat.JSONLD_FRAME_FLAT.equals(format))) return JSONLD_FORMAT.FRAME;
    +                   throw new RuntimeException("Unexpected output format");
    +    }
    +    
    +    private boolean isPretty() {
    --- End diff --
    
    Hi ajs6f, thanks for the comments. Yes, it is probably clearer.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to