alpha
Login
or
Join now
anil.recoil.org
/
ocaml-jmap
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
fix build (by claude)
author
Anil Madhavapeddy
date
1 year ago
(Mar 8, 2025, 5:17 PM UTC)
commit
8bb6c5e1
8bb6c5e1b4211caf21652bbda32717298f7b392a
parent
dbeabd8b
dbeabd8be341e3d455fa37a70681e37e33df7dca
+6
-6
4 changed files
Expand all
Collapse all
Unified
Split
dune-project
jmap.opam
lib
dune
jmap.ml
+1
-1
dune-project
Reviewed
···
14
14
(description "This is all still a work in progress")
15
15
(depends
16
16
(ocaml (>= "5.2.0"))
17
17
-
ezjsonm
18
17
ptime
19
18
cohttp
20
19
cohttp-lwt-unix
20
20
+
ezjsonm
21
21
uri
22
22
lwt))
+1
-1
jmap.opam
Reviewed
···
10
10
depends: [
11
11
"dune" {>= "3.17"}
12
12
"ocaml" {>= "5.2.0"}
13
13
-
"ezjsonm"
14
13
"ptime"
15
14
"cohttp"
16
15
"cohttp-lwt-unix"
16
16
+
"ezjsonm"
17
17
"uri"
18
18
"lwt"
19
19
"odoc" {with-doc}
+1
-1
lib/dune
Reviewed
···
1
1
(library
2
2
(name jmap)
3
3
(public_name jmap)
4
4
-
(libraries ezjsonm ptime cohttp cohttp-lwt-unix uri lwt))
4
4
+
(libraries str ezjsonm ptime cohttp cohttp-lwt-unix uri lwt))
+3
-3
lib/jmap.ml
Reviewed
···
329
329
330
330
(** Convert Ezjsonm.value to string *)
331
331
let json_to_string json =
332
332
-
Ezjsonm.to_string ~minify:false json
332
332
+
Ezjsonm.value_to_string ~minify:false json
333
333
334
334
(** Parse response string as JSON value *)
335
335
let parse_json_string str =
···
376
376
(** Serialize a JMAP request object to JSON *)
377
377
let serialize_request req =
378
378
let method_calls_json =
379
379
-
`A (List.map (fun inv ->
379
379
+
`A (List.map (fun (inv : 'a invocation) ->
380
380
`A [`String inv.name; inv.arguments; `String inv.method_call_id]
381
381
) req.method_calls)
382
382
in
···
388
388
let json = match req.created_ids with
389
389
| Some ids ->
390
390
let created_ids_json = `O (List.map (fun (k, v) -> (k, `String v)) ids) in
391
391
-
Ezjsonm.update json ["createdIds"] created_ids_json
391
391
+
Ezjsonm.update json ["createdIds"] (Some created_ids_json)
392
392
| None -> json
393
393
in
394
394
json_to_string json