[fpc-pascal] BSON formatter

Michael Van Canneyt michael at freepascal.org
Thu May 7 11:44:03 CEST 2020



On Thu, 7 May 2020, Andreas Schneider wrote:

> Am 2020-05-07 08:40, schrieb Ryan Joseph via fpc-pascal:
>> Working on the language server it's become clear that JSON is going to
>> be a killer bottleneck, but that's what Microsoft decided to use. It's
>> almost a deal breaker just because of the sheer size of the data due
>> to JSON's verbose plain text formatting.
>>
>> I've seen there is such thing as BSON
>> (https://en.wikipedia.org/wiki/BSON) which could be implemented over
>> JSON without disrupting the underlying architecture. Is there any BSON
>> formatters for the FPC JSON libraries? It's just serializing in a
>> different text format so it's probably pretty easy to implement but I
>> thought I would ask first.
>
> I would go with ProtoBuf for something like this. If you really want to
> be flexibel in the datastructure, look at msgpack/messagepack. Both
> (protobuf and msgpack) are pretty good in benchmarks.

The LSP protocol requires JSON, so it's not an option to use something else.
I'm not even sure BSON will be accepted for LSP.

Michael.


More information about the fpc-pascal mailing list