Μετάβαση στο κύριο περιεχόμενο

The reality and the future of software engineering

Format / beautify JSON strings fast and easy

If you are a Web developer you will have to handle JSON strings, for developing, debugging and testing applications and APIs. During theses processes you will also have to use JSON strings that are copied for a HTTP sniffing/dumping tool (e.g. the developer tools of your browser) to analyse them, present them or share them. In that case, you will need to beautify them so that they become human friendly and readable.

How do you do that fast and efficiently? OK, there may be a trillion different ways, and almost all IDEs that have some respect for themselves provide such JSON formatting functionality. But IDEs are heavy, and you typically will not create a new file to copy and paste the JSON string to beautify it and then discard it. I've seen many people resorting to "online" formatting tools (i.e. javascript-based formatters), but do you really need to do that (plus, you may be "sharing" you data without realizing it)?

Notepad++ to the rescue again! 



Just add the JSTool plugin (click here to see how to install Notepad++ plugins), paste the JSON string and hit Ctrl+Alt+M (or use the menu, Plugins >> JSTool >> JSFormat). 


Your JSON is formatted and ready to share.

Σχόλια

Δημοφιλείς αναρτήσεις από αυτό το ιστολόγιο

Counting Words, Characters and Lines with Notepad++

One of the best text editors in Windows is Notepad++ as it is lightweight, it provides a wealth of useful functionality –let alone the possible extensions through plugins. File Summary A useful feature of Notepad++ is that you can easily get a view on the size metrics of the document you are currently working on (characters, words, lines, etc). However, the menu is not that intuitive on finding that capability. So in order to get the above values you should go to: View >> Summary… The summary contains the following: Full path Created Modified File length (in byte) Characters (without blanks) Words Lines Current document length Selected Area Summary Nevertheless, the above summary provides file-level statistics and it may only provide the number of bytes and characters of a selected area. In order to count the word, characters, lines, etc. for just a selected part of the file you can install and use the TextFX Character plugin through the...

A typical Hello World blog post

Hi there fellow anonymous software engineers... Most probably none of you will ever get to this message as you are preoccupied with trouble-shooting some issue you have with the project you are currently working on. I can understand that -this is what I do for a living, too. The purporse of this blog is somewhat related to your, and my, daily struggles with the ever compex and demanding tasks of making software components, environments and systems work. Specifically, I decided to dump here my softeng/software/administration stories and the way I resolved the particular issues I was facing, so that, hopefully, some of you may benefit and save up some time as well as for future reference. I am no guru, I will never be, I am just like most of you, searching online for a solution -however, I also decided to document it.

State Management in Stateless Web Applications: Basics

The proliferation of REST and statelessness in Web Application and Web API design, state management often becomes a matter of misunderstandings and conflict in development teams. Programmers of back-end systems may be used to assume that session-related state is preserved server side and may be referred to as needed by the application code. However, stateful implementations may suffer from performance and scalability limitations, making thus the stateless approach a viable alternative, especially when high-load Web-based systems are considered. How to pass data between requests in state-less / session-less Web applications The problem here is that there are cases in state-less Web applications where data from an interaction may be required in subsequent interactions to be processed by the server, even though they are not stored in the server in some form. In this case, you will have to let the Web client provide these data as context (or state) of subsequent interactions. ...