Have python parse the json entered from the standard input

Every time I wonder which one is json.load [s] Call it like sys.stdin () and get angry I'm angry without specifying encoding ='utf-8', so I'll write it down.

#!/usr/bin/python
import json, sys

pythoned_json = json.load(sys.stdin, encoding='utf-8')

Recommended Posts

Have python parse the json entered from the standard input
[Python] Standard input
From Python 3.4, pip becomes the standard installer! ??
Python: Use zipfile to unzip from standard input
[Python] About standard input
[Python] Change standard input from keyboard to text file
[Python3] Standard input [Cheat sheet]
Python3 standard input (competition pro)
Standard input / summary / python, ruby
Receiving standard input tips @ python
[Python 2/3] Parse the format string
Python3 standard input for competitive programming
Matrix representation with Python standard input
[Introduction to Python] How to parse JSON
Existence from the viewpoint of Python
[Python] Adjusted the color map standard
Have python read the command output
Use the Flickr API from Python
Enum types that enter the standard library from Python 3.4 are still useful
Python Paiza-Various skill checks and standard input
Data input / output in Python (CSV, JSON)
Get keystrokes from / dev / input (python evdev)
Python: Reading JSON data from web API
Learning notes from the beginning of Python 1
Python3 standard input I tried to summarize
Let's summarize the Python coding standard PEP8 (1)
Launch the Python interpreter from Git bash
Let's summarize the Python coding standard PEP8 (2)
Atcoder standard input set for beginners (python)
Learning notes from the beginning of Python 2
[Python] Get the main color from the screenshot
[Python] Add comments to standard input files
Python #JSON
Get the contents of git diff from python
Let's parse the git commit log in Python!
Just add the python array to the json data
How to generate a Python object from JSON
Find the divisor of the value entered in python
Operate the schedule app using python from iphone
Make JSON into CSV with Python from Splunk
Use the nghttp2 Python module from Homebrew from pyenv's Python
Call Polly from the AWS SDK for Python
Try accessing the YQL API directly from Python 3
[Go] Create a tool that returns the Pokemon race value received from the standard input