2012/2/7 <[email protected]>: > On Tue, 7 Feb 2012, silvioprog wrote: >> Hellow guys, good afternoon. :) >> >> I'm tried to add items in a json object, and I tryied to save it in a >> file using stream. My doubt is: do I need to do everything manually? >> Or has json a native feature to save it in file? I really could not >> find it. > > You must do it manually. > > It's really simple. > > Var > S : TJSONStringType; > > begin > > With TFileStream.Create(MyFileName,fmCreate) > try > S:=MyObject.AsJSON; > WriteBuffer(S[1],Length(S)); > finally > Free; > end; > > But maybe a method to do this would not be bad. > > Michael.
His was exactly answer I wanted. Thank you guy! :) -- Silvio Clécio ==================================== Site - <silvioprog.com.br> LazSolutions - <code.google.com/p/lazsolutions> ==================================== -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
