Skip to content

Independent BSON implementation in V programming language

License

Notifications You must be signed in to change notification settings

impopular-guy/vbson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vbson

Independent BSON implementation in V programming language.

NOTE: This is an experimental library and is meant for learning purpose. It is not a complete implementation of BSON. Not recommended for professional use.

Installation

v install impopular-guy.vbson

TODO

  • Encoding
  • Decoding
  • Basic JSON/BSON conversion
  • Search one or more keys in BSON
  • Update one or more keys in BSON
  • Delete one or more keys from BSON
  • Stream decoding
  • Advanced searching (search by values, etc)

Quickstart

docs

Generate docs using the command v doc -no-timestamp -f md -m vbson .\src\

import impopular_guy.vbson

struct SomeStruct {
mut:
    a bool
    b int
    c i64
    d f64
    e string
}

fn main() {
    d := SomeStruct{
		a: true
		b: 120
		c: i64(8589934592)
		d: f64(-922.337)
		e: 'data'
	}
    
    enc := vbson.encode(d)!
    dec := vbson.decode[SomeStruct](enc)!
}

Reference

bsonspec.org

About

Independent BSON implementation in V programming language

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published