EnablingJSONIN: Difference between revisions

m
fix code tags, add category
mNo edit summary
m (fix code tags, add category)
 
Line 12: Line 12:
Now you can write code like the following:
Now you can write code like the following:


<code lang="vdf">
<source lang="dataflex">
   ...
   ...
   
   
Line 38: Line 38:
         End
         End
     End_Procedure
     End_Procedure
</code>
</source>


oProduct is a traditional webservice using SOAP.
oProduct is a traditional webservice using SOAP.
Line 45: Line 45:
Now . Given the following structure definitions:
Now . Given the following structure definitions:


<code lang="vdf">
<source lang="dataflex">
   Struct meta
   Struct meta
     Boolean success
     Boolean success
Line 85: Line 85:
   End_Struct
   End_Struct


</code>
</source>


You will be able to send tAddProductRequest as JSON from the client side as the request parameter
You will be able to send tAddProductRequest as JSON from the client side as the request parameter
Line 92: Line 92:
To parse the incoming request from  ExtJS 4  you could use the following model definition:
To parse the incoming request from  ExtJS 4  you could use the following model definition:


<code lang="javascript">
<source lang="javascript">
   Ext.regModel('Acme.Product', {
   Ext.regModel('Acme.Product', {
     idProperty: 'id',
     idProperty: 'id',
Line 115: Line 115:
  });
  });


</code>
</source>
 
[[Category:JSON]]