Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

kxBSON

Binary-JSON stream handler

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

kxBSON

Class for reading and writing a stream in BSON format

  • Delphi (Pascal)
  • BSON: Binary-JSON
  • Specification: bsonspec.org
  • Compiler: Embarcadero Delphi

History

  • Version 1 from 12/2020

Usage

pascal
uses 
  kxBSON;

procedure BSON_New();
var
  FBSONDoc: TBSONDocument;
begin
  FBSONDoc:=TBSONDocument.Create();
  FBSONDoc.Values.Add( TBSONItemInt32.Create('Item1', MAXInt) );
  FBSONDoc.Values.Add( TBSONItemDouble.Create('Item2', Pi) );
  FBSONDoc.SaveToFile( ExtractFilePath( Application.ExeName ) + 'hello.bson' );
  FBSONDoc.Free;
end;