[Isis-users] json 2 isis

Guilda Ascencio guildaa at gmail.com
Fri Mar 17 18:20:27 CET 2017


Dear gus.

 In PHP a have a script in which:

1. Read the json array
2. Code the equivalence between arrays elements and  the isis database tags
3. Process each record of the json array and builds a string with the isis
tags in the form of:

<tag1 0>CONTENT OF THE ELEMENT 1 OF THE JSON ARRAY EQUIVALENT TO
TAG1</tag1><tag2 0>.............

4. The string built with each record ($ValorCapturado) and the name of the
database to be updated ($base)  are passed to the function GrabarRegistro.
In the function, $db_path is the path to the folder where is the database
to be updated.

You can create a folder (json2isis) and place inside the executable
wxis.exe and the IsisScript actualizar.xis attached to this mail.


function GrabarRegistro($ValorCapturado,$base){
global $db_path;
    $ValorCapturado=urlencode($ValorCapturado);

$query="&base=$base&cipar=$db_path"."par/$base".".par&login=ABCD&path_db=$db_path";
    $query.="&ValorCapturado=".$ValorCapturado."&Opcion=crear";
    putenv('REQUEST_METHOD=GET');
    putenv('QUERY_STRING='."?xx=".$query);
    $Wxis="wxis.exe" ;
    IF (stripos(PHP_OS,"win")===false)
        $Wxis="./".$Wxis;
    $IsisScript="actualizar.xis";
    exec("\"./".$Wxis."\" IsisScript=$IsisScript",$contenido);
    $contenido=implode("\n",$contenido);
    return $contenido;
}


Hope it helps

Regards,



On Fri, Mar 10, 2017 at 10:25 AM, gus <ggus at riseup.net> wrote:

> Hi, does anybody already tried to import from json to isis?
> Any tips?
>
> I'm using isis2json.py to export to mongodb, but I also want to do the
> reverse path.
>
> thanks!,
> gus
> _______________________________________________
> isis-users mailing list
> isis-users at iccisis.org
> To manage your own subscription options go to: http://lists.iccisis.org/
> listinfo/isis-users
> Or contact Henk Rutten: hlrutten at xs4all.nl
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20170317/4e8b2ed3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: actualizar_json.xis
Type: application/octet-stream
Size: 2086 bytes
Desc: not available
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20170317/4e8b2ed3/attachment.obj>


More information about the isis-users mailing list