marklogic / marklogic/marklogic-contentpump

Allow use of delimited_root_name for JSON

Open
#66 0 comments 0 reactions 1 assignee View on GitHub

@mattsunsjf is already working on this.

Since Sep 19, 2017.

major mlcp new task
Dominant language
Java
Stars
37
Forks
32
Avg merge
1h 3m
Merged PRs (30d)
12

Description

When importing delimited text data to generate JSON, an input like this:

key1,key2,key3,key4
a,b,c,d
e,f,g,h

will produce JSON like this:

{
  "key1": "a", 
  "key2": "b", 
  "key3": "c", 
  "key4": "d"
}

Allow the use of -delimited_root_name for JSON to set a root property.

mlcp.sh import -username admin -password admin -host localhost -port 8000 -input_file_path test.csv -document_type json -input_file_type delimited_text -delimited_root_name myRoot

producing:

{
  "myRoot": {
    "key1": "a", 
    "key2": "b", 
    "key3": "c", 
    "key4": "d"
  }
}

(Issue filed in response to a Stack Overflow question.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.