{"id":3839,"date":"2017-11-27T13:03:27","date_gmt":"2017-11-27T13:03:27","guid":{"rendered":"http:\/\/www.nikola-breznjak.com\/blog\/?p=3839"},"modified":"2017-11-27T13:07:19","modified_gmt":"2017-11-27T13:07:19","slug":"prevent-js-beautify-visual-studio-code-expand-json-objects","status":"publish","type":"post","link":"https:\/\/nikola-breznjak.com\/blog\/quick-tips\/prevent-js-beautify-visual-studio-code-expand-json-objects\/","title":{"rendered":"How to prevent js beautify in Visual Studio Code to expand JSON objects"},"content":{"rendered":"<p>In this quick tip I&#8217;ll show you how simple it is to prevent js-beautify in Visual Studio Code to expand JSON object. Of course, for those who use js-beautify plugin in Visual Studio Code and don&#8217;t want to automatically expand their JSON objects that they may have (for a reason) inlined.<\/p>\n<p>If you&#8217;re currently not utilizing the <code>.jsbeautifyrc<\/code> file, then first create it in the root directory of your project. After this, just put this content in it:<\/p>\n<pre><code>{\n    \"brace_style\": \"collapse-preserve-inline\"\n}\n<\/code><\/pre>\n<p>Restart VSC and that&#8217;s it. More information about this &#8216;issue&#8217; can be found in the official bug thread <a href=\"https:\/\/github.com\/beautify-web\/js-beautify\/issues\/315\">on Github<\/a>.<\/p>\n<p>Hope this helps someone ?<\/p>\n<blockquote class=\"twitter-tweet\" data-width=\"550\">\n<p lang=\"en\" dir=\"ltr\">How to prevent js beautify in Visual Studio Code to expand JSON objects <a href=\"https:\/\/t.co\/mNuRjy7Xht\">https:\/\/t.co\/mNuRjy7Xht<\/a><\/p>\n<p>&mdash; Nikola Bre\u017enjak (@HitmanHR) <a href=\"https:\/\/twitter.com\/HitmanHR\/status\/935132162592071680?ref_src=twsrc%5Etfw\">November 27, 2017<\/a><\/p><\/blockquote>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this quick tip I&#8217;ll show you how simple it is to prevent js-beautify in Visual Studio Code to expand JSON object. Of course, for those who use&hellip;<\/p>\n","protected":false},"author":1,"featured_media":3840,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-3839","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-quick-tips"],"_links":{"self":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/3839","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/comments?post=3839"}],"version-history":[{"count":2,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/3839\/revisions"}],"predecessor-version":[{"id":3842,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/3839\/revisions\/3842"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/media\/3840"}],"wp:attachment":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/media?parent=3839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/categories?post=3839"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/tags?post=3839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}