Jump to content

[SOLVED] Json as parameter between 2 program. Lost quote


Recommended Posts

hi guys !
how are you ? fine ? yeahhh

Here is my problem:

I have 2 autoit applications, a.exe and b.exe

In a.exe, i call b.exe with a json as parameter:

FileWrite("N:\+++ Dev\ClientServeur\FolderMonitor.nca", "lejson in A:" & Json_Encode($json_tmp)& @CRLF)
        Run(@ScriptDir & "\FolderMonitor.exe " & Json_Encode($json_tmp) )

                       
        In program B:

;Firstline of program:
        FileWrite("N:\+++ Dev\ClientServeur\FolderMonitor.nca", @CRLF & "json in B:" & $CmdLine[1] & @CRLF)

       
        Output:
               
        lejson in A:{"DOSSIERS":{"Dossier_Hidden":"N:\\+++ Dev\\ClientServeur\\","Dossier_du_script":"N:\\+++ Dev\\ClientServeur\\","Fichier_Historique":"N:\\+++ Dev\\ClientServeur\\Historique.log","Fichier_DEBUG":"N:\\+++ Dev\\ClientServeur\\FolderMonitor.nca"}}
        json in B  :{DOSSIERS:{Dossier_Hidden:N:\\+++ Dev\\ClientServeur\\,Dossier_du_script:N:\\+++ Dev\\ClientServeur\\,Fichier_Historique:N:\\+++ Dev\\ClientServeur\\Historique.log,Fichier_DEBUG:N:\\+++ Dev\\ClientServeur\\FolderMonitor.nca}}

As you see, i lost my quote in my json so it's au problem to parse my json.

I use THIS library

I tried different type of encoding (ex JSON_STRICT_PRINT), but i don't think that it's the problem. Maybe i'm wrong

 

thanks

Nicolas.

Edited by satanico64
Link to comment
Share on other sites

  • Developers

You probably need to use an urlencode before sending and urldecode function  when receiving the data.

Maybe this will work 

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...