CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Anybody using JSON service to respond to request?

Print topic Send  topic

Author Message
RoyBaird

Posts: 115
Posted: 02/04/2015, 7:09 AM

Documentation on JSON Service is almost non-existent. I created a JSON service to respond to a request. Now, I don't know what to do with it... I was able to overcome the issue of selecting the record I wanted by using the "build query" option in the wizard and setting the source to URL. I need to call the service from a page, but how?

Thanks in advance...

_________________
Roy
View profile  Send private message
RoyBaird

Posts: 115
Posted: 02/04/2015, 7:32 AM

Ok, I just put the service in a url with the value of my search item and the data showed up. BUT, it does not have the field names with a colon. So, what's the point of using the builder? I can do all of that manually.

anybody?
_________________
Roy
View profile  Send private message
RoyBaird

Posts: 115
Posted: 02/04/2015, 7:54 AM

Ok, Sportsfans, here is what you can do to use the service builder for a JSON response;
Use the query builder option to select the fields you want and the search item, but sure to use the same name as the request will have and set to URL.
after you generate the code, go into the HTML page and put in your item names with a colon and surround that with a double quote and remove them from around the data. I guess that is a little better than building the whole thing from scratch... but really it is the same amount of work. Ideally, CCS should put the field name in quotes and colon along with the value. Just like a record or grid.
_________________
Roy
View profile  Send private message
eratech


Posts: 513
Posted: 02/04/2015, 8:29 PM

Roy - yeah, I think the JSON builder was overblown and for my small requirements I do as you did - create the grid and manually change the HTML to JSON formatting.

The Server Action 'Format JSON' really just changes the values to remove any non-JSON-lovin' characters.

I suppose with the ability to select the Grid Layout (Vertical, Horizontal, DIV) you could make a DIV template? I'll look into that.

Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.