Hi list,
I'm going to write a serializer/decerialiser pair of procedures for
a data
description format (more specifically, for JSON, see http://
json.org and http://json-rpc.org ).
BJSONAdditions (http://blakeseely.com/blog/archives/2006/03/29/
bsjsonadditions-12/,
the lates version is actually 1.3 at http://blakeseely.com/source/
BJSONAdditions.zip )
suggests
@interface NSDictionary (BSJSONAdditions)
+ (NSDictionary *)dictionaryWithJSONString:(NSString *)jsonString;
- (NSString *)jsonStringValue;
@end
One thing I do not understand is: is it the best to read from
NSString?
Most of the time JSON will be read from stream socket, sometimes
from file,
therefore I was seeking for some universal object that provides per-
character read
access without requiring any knowledge of the media.
In C++ there are input and output streams (<iostream>) that are
widely used for
I/O when a programmer wants to detach the API from a particular media.
I was reading about NSStream and its subclasses and got confused. I
realized I can get
them for socket, file or memory buffer, but I did not realize how
to use them for
per-character input or output.
What is the recommended way to do buffered I/O in NextStep?
Thanks a lot,
Tima
_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnustep
----------------------------------------------------------------------
-----------------
Orange vous informe que cet e-mail a ete controle par l'anti-virus
mail. Aucun virus connu a ce jour par nos services n'a ete detecte.