As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I am building a library that makes calls to a server that returns JSON. I'd like to be able to test this library. This would require my testing code to make a call to a working server that returns JSON. Does anyone know of a server that is suitable for this purpose?
There is a great server located at http://echo.jsontest.com that does precisely this. You can even determine the output by changing the URI you call.
For example, the http://echo.jsontest.com/key/value URI returns this:
{"key": "value"}
And the http://echo.jsontest.com/key/value/otherkey/othervalue URI returns:
{
"otherkey": "othervalue",
"key": "value"
}
The server is also very fast, ideal for testing purposes.
You can test your lib with facebook or twitter public api.
For exemple :
http://search.twitter.com/search.json?q=blue%20angels will return a json object.
Doc here : https://dev.twitter.com/docs/api/1/get/search
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I just learned the concept behind JSON objects and there use and I'll love to learn handling of JSON with Java and C++, does anybody have any knowledge about using JSON in the two languages and could provide some useful links and information to aid my way?
I've found JSON in general to be great for quickly storing and re-loading large data structures for quick use between models (or saving information so you can pick up where you left off). I've only ever used it in Python but http://www.json.org/ has a great list of JSON libraries for many languages
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
We're using a few libraries that include an xml parser library through maven. We think we've excluded most of those as we are using a newer version.
Is there some sort of JUnit library to check an ear/war for the presence of that jar and fail the test if its there? Or do we just need to write some code to unzip the archive and loop over the directory checking for it?
Often when this happens, there are classes that appear in both jars, so you can check your classpath looking for duplicates. Given a class, you can see how often it appears on the classpath:
public void testSomeClassInClassPathOnce() {
String className = SomeClass.class.getName();
String path = className.replace('.', File.separatorChar) + ".class";
Enumeration<URL> urls = ClassLoader.getSystemResources(path);
assertTrue(urls.hasMoreElements());
urls.nextElement();
assertFalse(urls.hasMoreElements());
}
If the old jar has a class that isn't in the new one, then you can use ClassLoader.getSystemResource() to see if that class is on your classpath.
Note that you need to make sure your JUnit test has all of the production jars in the classpath.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Do you know a free test data generator for mysql database?
Maybe native tools allow you to generate test data?
You could try GenerateData.com. It lets you quickly generate large volumes of custom data (Name, Adress, Phone number, random number, random text...) in a variety of formats (csv, xml, excel, mysql, oracle).
Edit: If you don't want to install it, there is an online generator that allows you to generate data up to 5000 rows.
I've come across this one generator.
May be useful:
http://sourceforge.net/projects/spawner/
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I'm using QT for Symbian and need a simple json parser. I need to be able to go from json to Qt-variant and the other way around. Is there a simple json parser that I can use? I don't want to write my own.
You need no Additional code except QT itself to parse JSON with QT
http://doc.qt.io/qt-5/json.html
Check out Qt-Json
Its a dead-simple class for parsing and serializing JSON data.
The qjson project may be a good start. It has also been packaged for Debian.
I wrote a QLALR based JSON parser : http://git.forwardbias.in/?p=qjsonparser.git.
git clone git://git.forwardbias.in/qjsonparser.git.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
My main purpose is to have a generic data buffer that I can use for transfers.
I'm thinking of something along the lines of what XCopy did.
Is there something already made out there or a good example one can follow?
The Tomes of Delphi by Julian Bucknall describes code for circular buffers, the code of which is freely available as a download. I haven't got the book to hand at the moment, so I can't tell you exactly where to look (though I think it might have had something to do with carrying out data compression with a sliding window).