← Back to team overview

dhis2-devs team mailing list archive

Re: Problem with json metadata import

 

That sounds strange Olav, there should be no functional difference between
JSON and XML (they are both parsed by the same framework).

Can you run the JSON through jsonlint.com ? just to see if there are any
format issues

--
Morten

On Mon, Sep 29, 2014 at 7:31 PM, Olav Poppe <olav.poppe@xxxxxx> wrote:

> Hi,
> I’m trying to import some metadata (report favorites) through the API in
> json format, but I’m having some problems - only the name/object is
> imported, none of the associated metadata/settings.
>
> As a test, I did the following on the demo server:
> 1) exported a reporttable in json format (using detailed metadata export)
> 2) removed the uid and changed the name
> 3) imported it on the same server: curl -u admin:district -X POST
> -H «Content-Type: application/json» -d @metaData.json "
> https://apps.dhis2.org/demo/api/reportTables";
>
> The favorite is imported, but trying to open it gives this error: «At
> least one dimension must be specified as row or column», and looking at the
> metadata I see that nothing has really been imported except the name itself.
>
> When I do the exact same thing with XML, everything is fine. Am I doing
> something wrong, or is this a bug?
>
> BTW, same thing is happening with trunk.
>
>
> Olav
>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References