How to write code : Programmer's Cheat Sheet

How to write code : Programmer's Cheat Sheet

Menu

Skip to content
  • Programming

Monthly Archives: June 2019

Reading and Writing JSON file

Python

import json
# to read a json file
data = {}
withopen(input_file) as json_file:
    data = json.load(json_file)
for k,v in data.items():
    print(f”{v}”)
June 11, 2019bikrant Leave a comment

Recent Posts

  • Log4j2 configuration example
  • Apache Spark “cannot access class sun.nio.ch.DirectBuffer” error with Java 15 or higher
  • Howto marshal an instance of protobuf to JSON
  • How to unmarshal protobuf to json in golang
  • Reading and Writing JSON file

Recent Comments

SutoCom Solutions's avatarSutoCom on Multiprocessing jobs with work…
rhinobean's avatarrhinobean on iPhone – Convert NSMutab…

Archives

  • October 2023
  • June 2019
  • September 2015
  • October 2013
  • March 2013
  • December 2012
  • August 2012
  • July 2012

Categories

  • Android
  • Apache Spark
  • Automation
  • code
  • iphone
  • Java
  • Linux
  • Performance
  • Programming
  • Puppet
  • python
  • System
  • Uncategorized

Meta

  • Create account
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.com
Blog at WordPress.com.
  • Subscribe Subscribed
    • How to write code : Programmer's Cheat Sheet
    • Already have a WordPress.com account? Log in now.
    • How to write code : Programmer's Cheat Sheet
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar