How to construct this JSON?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to construct this JSON?

srini
I need to construct the following json. All these values are dynamic. There can be more than one author and more than one source. I need to make InvokeHTTP call, to get the name and name_id. And I need to make one more InvokeHTTP call to get the label in the source.

{
        "author": [{
                "repo_path": "/content/news/person/s/tom-starnes",
                "name": "Tom Starnes",
                "name_id": "tom-starnes"
        }],
        "source": [{
                "repo_path": "/content/global/source/news-com",
                "label": "News.com"
        }]
}

Can someone give high level design to the flow in nifi for the above?
Reply | Threaded
Open this post in threaded view
|

Re: How to construct this JSON?

srini
This post was updated on .
Hi,
Here please see the flows which I developed to achieve the above JSON.
These are two independent flows, these flows are working fine. Here my target is to MERGE the output of those two flows. The first one gives source JSON and the second one gives author JSON.




How to do that? How to merge? I want to make it one flow.

thanks
Srini