This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let rec encode (o:obj) = | |
let x = ofObject o in | |
let b = toBytes x in | |
let length = List.length b in | |
let lenghtInByte = List.head (toBytes (Int length)) in | |
let lenghtOfLenghtBinaryFormInByte = List.head (toBytes(Int(String.length (intToBinary length)))) in | |
match x with | |
| String s -> | |
match length with | |
| 0 -> [0x80uy] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"content": [ | |
{ | |
"id": 10017, | |
"location": { | |
"id": 10017, | |
"country": "GB", | |
"region": "London", | |
"city": "London", | |
"postCode": "SW20 0RW", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"content": [ | |
{ | |
"id": 10017, | |
"location": { | |
"id": 10017, | |
"country": "GB", | |
"region": "London", | |
"city": "London", | |
"postCode": "SW20 0RW", |