{"id":2302,"date":"2018-10-22T21:00:16","date_gmt":"2018-10-23T01:00:16","guid":{"rendered":"http:\/\/ninecrows.com\/career\/?p=2302"},"modified":"2018-10-22T10:03:19","modified_gmt":"2018-10-22T14:03:19","slug":"json-over-stdin-stdout","status":"publish","type":"post","link":"https:\/\/ninecrows.com\/career\/2018\/10\/22\/json-over-stdin-stdout\/","title":{"rendered":"JSON over stdin\/stdout"},"content":{"rendered":"\n<p>I&#8217;m looking at adding a json over standard I\/O pipes option to my tool from last weekend. I&#8217;m thinking of this as an intermediate option between interop type solutions (jni, pinvoke and such) and simple command line execution.<\/p>\n\n\n\n<p>Adding in a &#8211;jsonrpc option to the tool that selects a mode where json object are read from stdin and json results are emitted to stdout seems like a pretty good option. This should provide an abstracted but tightly coupled interface between a piece of code running as a separate process and a language that may not have access to the APIs needed to get the job done.<\/p>\n\n\n\n<p>This does imply that there will be one subprocess per parent process that needs access. The upside of this is that things remain modular where a problem with one subprocess has no effect on others in the system. We sacrifice a bit of efficiency along the way, but I can&#8217;t see that as a major issue in most cases.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m looking at adding a json over standard I\/O pipes option to my tool from last weekend. I&#8217;m thinking of this as an intermediate option between interop type solutions (jni, pinvoke and such) and simple command line execution. Adding in a &#8211;jsonrpc option to the tool that selects a mode where json object are read &hellip; <a href=\"https:\/\/ninecrows.com\/career\/2018\/10\/22\/json-over-stdin-stdout\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">JSON over stdin\/stdout<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[43,9,5,7],"tags":[],"class_list":["post-2302","post","type-post","status-publish","format-standard","hentry","category-c","category-daily-blog","category-thoughts","category-topics"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7F2Qc-B8","jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/posts\/2302"}],"collection":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/comments?post=2302"}],"version-history":[{"count":4,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/posts\/2302\/revisions"}],"predecessor-version":[{"id":2306,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/posts\/2302\/revisions\/2306"}],"wp:attachment":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/media?parent=2302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/categories?post=2302"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/tags?post=2302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}