Hi I have a small comment shoutbox type cgi process running on a server and currently when someone leaves a comment I simply format that comment into html i.e
<p class="title">$title</p>
<p class="comment">$comment</p>
and store in a flat file.
Would it be faster and acceptably low in LOC to reimplement the storage in xml or json, in a...
Is there a (roughly) SQL or XQuery-like language for querying JSON?
I'm thinking of very small datasets that map nicely to JSON where it would be nice to easily answer queries such as "what are all the values of X where Y > 3" or to do the usual SUM / COUNT type operations.
As completely made-up example, something like this:
[{"x": 2,...
(For further background, this relates to the same piece of work as a previous question)
I'm creating a JavaScript based webchat system using jQuery to make life much easier. All the webchat JavaScript code is in an external js file, which is then referenced and instantiated by the html page.
<html xmlns="http://www.w3.org/1999/xhtml"&g...
Hello,
Is there any good erlang library for creating / accessing SOAP web services?
Maybe also handling plain XML is quite difficult.
Is Json a good alternative? Any lib for that?
My goal is interop with existing .Net web services.
Thanks
...
For this example, assume that I have a list of months in a form, each with a checkbox next to them. I'm looking for help on doing either of two things:
Convert a query string (e.g. "January=on&March=on&September=on") or
Convert an object map: [{ January: 'on' },{ March: 'on' },{ September: 'on' }]
to a single JSON object: { January:...
I wrote a [WebMethod] that return a string that store a serialized object
[WebMethod]
public string doStuffs() {
...
return JavaScriptConvert.SerializeObject(myObj);
// JSON Serializer library is JSON.NET 1.3.1, for MONO
}
When I call the method with a $.post from JQuery:
$.ajax({
type: "POST",
url: "/web/doStuffs",
da...
If I have a json file that looks something like this:
{"name":"bob","hi":"hello"}
{"name":"hello","hi":"bye"}
Is there an option to import this into couchdb?
...
I've been trying to make an ajax request to an external server.
I've learned so far that I need to use getJSON to do this because of security reasons ?
Now, I can't seem to make a simple call to an external page.
I've tried to simplify it down as much as I can but it's still not working.
I have 2 files, test.html & test.php
my test.htm...
Executing that:
$.post(
"/url/to/method",
{ },
function(data){
var obj2 = eval("("+$(data).children()+")");
// OR var obj = $.evalJSON($($(data).children())); // Jquery-json
$body = $("#AAA");
$body.html(obj.fied);
},
"xml"
);
while turn into a "missing ] after element list" (at row 5 or 6) error in firebug. The JSON ...
I am starting to use the jquery $.ajax() but I can't get back what I want to...I send this:
$(function(){
$.ajax({
url: "graph_data.php",
type: "POST",
data: "casi=56&nada=48&nuevo=98&perfecto=100&vales=50&apenas=70&yeah=60",
dataType: "json",
error:
function (xhr, desc, exceptionobj) {
...
I would like to use Python's JSON module. It was only introduced in Python 2.6 and I'm stuck with 2.5 for now. Is the particular JSON module provided with Python 2.6 available as a separate module that can be used with 2.5?
...
Hello!
I am trying to make Django view that will give JSON responce with earliest and latest objects. But unfotunately it fails to work with this error.
'str' object has no attribute '_meta'
I have other serialization and it works.
Here is the code.
def get_calendar_limits(request):
result = serializers.serialize("json", Sessi...
When I serialize a enum value using DataContractJsonSerializer, it serializes the numerical value of the enum, not the string name.
IE:
enum foo
{
bar,
baz
}
Serializing a value of foo.bar returns "0", not "bar".
I'd prefer it the other way around, is there a way to override this?
Edit:
Because I didn't want to change the ...
I'm trying to make a Django function for JSON serializing something and returning it in an HttpResponse object.
def json_response(something):
data = serializers.serialize("json", something)
return HttpResponse(data)
I'm using it like this:
return json_response({ howdy : True })
But I get this error:
"bool" object has no at...
Is there any existing JSON parser which can be used from VB6?
I could obviously write my own parser, but I don't want to reinvent the wheel if I don't have to.
Thanks!
...
What is the best way to deal with JSON in IronPython 2.0.1. The native Python "standard library" json looks to be not implemented yet.
If I wanted to use the Newtonsoft Json.NET library how do I do this? I could add the assembly to the GAC, but what are my other choices?
...
i have never used JSON and want to find more about it as people keep referring to it as a better version of XML for sending data from client to server.
can someone please suggest a good resource
...
Hi guys,
I'm tasked to design a new API for our infrastructure. Some of the things I'd like to do is:
implement oauth for authentication
good xml-based structure, adapting ATOM, GEO-RSS and other xml schema standards where applicable.
JSON output
Some of the things I've been thinking about is applying REST. In practice I find it's n...
Hello,
I am returning a List<> from a webservice as a List of JSON objects. I am trying to use a for loop to iterate through the list and grab the values out of the properties. This is a sample of the returning JSON:
{"d":[{"__type":"FluentWeb.DTO.EmployeeOrder",
"EmployeeName":"Janet Leverling",
"EmployeeTitle":"Sales Representative...
I've only recently heard about JSON (Javascript Object Notation).
Can anybody explain why it is considered (by some websites/blogs/etc) to be important?
We already have XML, why is JSON better (apart from being 'native to Javascript')?
Edit: Hmm, the main answer theme seems to be 'it is smaller'. However, the fact that it allows data fe...