How to Parse JSON With Simple C Code Using Steem Block 2M as an Example

i made this

Today I made a video tutorial to show you how to parse JSON with simple C, as well as some other fun things such as how to step through debug C code on Mac OS X with CLion.

 

The inspiration for this was that I was reading @faddat’s great post about JSON and Steemit. I had also been looking into a simple, portable, tool to parse JSON from C called JSMN.

1_wtf_is_json_series__ingestron_-__steemjson__making_steem_a_universal_json-storage_blockchain_step_by_step_-_steemit

Why is it useful to be able to do this? As @faddat says “It [the JSON for the Steem block] contains all the information that’s needed to use STEEM’s 2,000,000th block. Posts, upvotes, everything.” Sounds useful. Let’s assume you want to get this info from C and you need a simple, reliable, fast, portable way to do it.

2the_most_simple_json_parser_in_c_for_small_systems

I thought you might find it useful if I combined these things and made a few tutorial videos, so here they are. I’ve added some screenshots below these to give you a taste of what you’ll see also.


How to Parse JSON With Simple C Code Video Part 1 (~10 min)

Topics: Introduction. Steem & JSON. JSMN C parser. CLion IDE. Makefiles.


How to Parse JSON With Simple C Code Video Part 2 (~10 min)

Topics: Make and run the steem_block.c example. Debug configurations for make projects in CLion – tips and tricks. Building a Makefile project successfully in CLion for Debugging.


How to Parse JSON With Simple C Code Video Part 3 (~10 min)

Topics: Stepping through the steem_block.c and JSMN example code. Debugger tips: inspecting variables, break points, stepping in/out/over code, etc. Final summary and plug of my blog.


Screenshots

How to Make Stuff

8-make

Go Inside the Computer!

7parsing_json_with_simple_c_-_part_3

The Steem Block JSON is Inside the C Code!

5steem_block_c_-_jsmn-master_-____externalrepos_jsmn-master_

If you learned nothing else here, I hope you learned that step through debugging rocks.

Join the fight. Learn step through debugging. Go INSIDE THE COMPTUER(sic)

 

I hope you found these videos useful and have a great one!

Bryan Gmyrek aka @nonlinearone

Credits: All images and videos were created by the author.

Simulposting: This post was simulcast (or, as I like to call it, simulposted(TM)) on my SteemIt Blog.

About the Author

photo-on-9-12-16-at-8-29-pm-2

Bryan Gmyrek is a full time software developer and lives in sunny Arizona with his beautiful wife, three sons and two golden puppies. He holds a Ph.D. in physics from the University of Arizona based on the particle physics research he did at the world famous DZero Experiment at the Fermi National Accelerator Laboratory. He has been online since 1993, into cryptocurrencies since 2013, won prizes at three Bitcoin hackathons, and co-organizes the highly technical Blockchain Meetup in Phoenix Arizona for over a year. Many of his videos are popular on YouTube, including his recent SteemIt technical talk. He also blogs about nature photography, dogs, national parks and hiking. Pay no attention to that Tardis. Read more in my top 50 introduceyourself post

Join My Newsletter

Email “decentralize thought” to bryangmyrekcom@gmail.com to join my new newsletter about decentralized technologies, programming, nature, and more.

Follow me @nonlinearone

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s