Quote:
Originally Posted by
psysc0rpi0n
Does anyone knows a way of doing this with bash script?
Yes, you can do this in
bash, but most people working with JSON are serializing data to be displayed on the web and so, they generally do not program web-based applications using
bash.
What I find at unix.com is a lot of people, especially during the start of the school year in September, tend to have these "odd problems" where they are required to use one scripting language or another to do a homework assignment and then they attempt to hide the fact it is homework by coming up with some odd reason to do something that, in the real world, is simply not done this way.
For example, I write a lot of code to process JSON and I do this either in Javascript or in PHP; because 99% of all the code I write is related to web projects; because most people (like me) use JSON APIs to retrieve JSON objects across the network and use those objects in an application, generally written for the web (PHP, Javascript, Python) or maybe a modern gaming engine (which will use C++, Javascript, or C#, for example).
When you ask, "is this possible" my thoughts are why do you ask this? Because just about everything in a computing environment is possible.
The trick is to use the right tools for the job based on the application, the skill sets of the "shop" you are working in, etc.
However, during this time of year, more often than not, the driving requirement we see from new members is the strict and narrow task in a homework problem.
Now, I'm not staying for sure you are posting a vailed homework assignment, but I can tell you that this time of year, every year, we see a lot of homework posts, often written like yours, in a kind of obscure post about "a friend wants me to do this or that" or "I must do this in bash, because only bash is permitted" ; and it turns out that 95% of the time, these are all some forms of classwork where the member is new and posts something in some "disguised post" to get answers to homework assignments.
So, having said that....
What are you actually doing? For what actual project?
Please provide the project details of what you are really doing.
Thanks.