I ran into some issues when using Json_value contents with irmin-pack.unix that were fixed by setting content_length_header = None in the irmin-pack config. It seems worth cleaning this up so json types work regardless of the configuration, but I'm not sure how much work that would take at this point.
Also mentioned here: #2369 (comment)