package avro
 sectionYPositions = computeSectionYPositions($el), 10)"
  x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
  >
  
  
On This Page
  
  
  Runtime library for encoding/decoding Avro
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
  
    
      v0.1.tar.gz
    
    
        
    
  
  
  
    
  
  
    
  
        md5=729b33e6f19b3065fe2e3444c0981d73
    
    
  sha512=671049a5b471323d87bfa7fd85dc4d1a5ba606c035110e2170b292f32d90d37f093ba91eb0234fbf73435c4c6c3a9a7381fb1a4e450101fa10ff5dea1e3e62a8
    
    
  Description
Published: 12 Dec 2021
README
Avro 
- avrois the runtime library, should be reasonably small (depends only on- camlzip)
- avro-compilercan read a json schema and generate code from it
See some examples from the tests/ directory:
- tests/records.jsonand- tests/records_test.mlthat use it. you can see what the schema compiler will produce:- $ ./compiler.sh ./tests/records.json (* generated by avro-compiler *) open Avro module Str_map = Map.Make(String) let schema = "{\"type\":\"record\",\"name\":\"test\",\"fields\":[{\"type\":\"long\",\"name\":\"a\"},{ \"type\":\"string\",\"name\":\"b\"}]}" type nonrec t = { a: int64; b: string; } let read (input:Input.t) : t = (let a = Input.read_int64 input in let b = Input.read_string input in { a;b }) let write (out:Output.t) (self:t) : unit = ((let self = self.a in Output.write_int64 out self); (let self = self.b in Output.write_string out self); )
- similarly for tests/employee.jsonandtests/employee_test.mlthat use it
License
MIT license.
 sectionYPositions = computeSectionYPositions($el), 10)"
  x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
  >
  
  
  On This Page