recentpopularlog in

kme : json   88

« earlier  
Firefox Bookmark Backup Reader/Decompressor — Fx File Utilities
Firefox creates frequent backups of your bookmarks. Automatic backups are compressed using Mozilla's flavor of LZ4 compression (.jsonlz4 file extension), while backups you create yourself (in the Library window) are not compressed (.json file extension by default). This tool can convert a backup file to the HTML export format.
firefox  bookmarks  json  jsonlz4  backupandrecovery  importexport  solution 
9 weeks ago by kme
GitHub - tomnomnom/gron: Make JSON greppable!
gron - Make JSON greppable!

gron transforms JSON into discrete assignments to make it easier to grep for what you want and see the absolute 'path' to it. It eases the exploration of APIs that return large blobs of JSON but have terrible documentation.
go  json  textprocessing  grep  patternmatching  webdevel  debugging  troubleshooting  commandline  cli 
july 2019 by kme
Developer's Guide  |  Google Maps Geocoding API  |  Google Developers |
In a geocoding response, the Google Maps Geocoding API can return address results restricted to a specific area. You can specify the restriction using the components filter. A filter consists of a list of component:value pairs separated by a pipe (|). Filter values support the same methods of spelling correction and partial matching as other geocoding requests. If the geocoder finds a partial match for a component filter, the response will contain a partial_match field.
google  maps  api  json  geocoding  solution 
january 2018 by kme
perl - How can I convert my JSON to CSV using jq? - Stack Overflow |
Building upon Joe Harris' answer, you can use the @csv filter so that strings are properly quoted and escaped when necessary :

jq -r '[.case, .custom."speech invoked", .custom."input method"] | @csv'
jq  json  csv  importexport  textprocessing  webdevel  solution 
october 2017 by kme
Using the Google Places API in Python | Andrew Wheeler
MyUrl = (''
'&sensor=false&key=%s') % (LOCATION, RADIUS, TYPES, AUTH_KEY)
#grabbing the JSON result
response = urllib.urlopen(MyUrl)
jsonRaw =
jsonData = json.loads(jsonRaw)
return jsonData
python  api  json  googlemaps  geolocation  solution 
april 2017 by kme
TOML vs. JSON - Tom Limoncelli's EverythingSysadmin Blog
The other difference is around comments. One camp permits them and another camp doesn't. In operations often we need to be able to temporarily comment out a few lines, or include ad hoc messages. Operations people communicate by leaving breadcrumbs and todo items in files. Rather than commenting out some lines I could delete them and use version control to bring them back, but that is much more work. Also, often I write code in comments for the future. For example, as part of preparation for a recent upgrade, we added the future configuration lines to a file but commented them out. By including them, they could be proofread by coworkers.
toml  json  configuration  operations  sysadmin  breadcrumbs  documentation  butwhy  thisvsthat 
april 2017 by kme
Why does Cargo use toml? - The Rust Programming Language Forum
The TOML readme has a small section comparing itself to JSON, YAML and INI:

In some ways TOML is very similar to JSON: simple, well-specified, and maps easily to ubiquitous data types. JSON is great for serializing data that will mostly be read and written by computer programs. Where TOML differs from JSON is its emphasis on being easy for humans to read and write. Comments are a good example: they serve no purpose when data is being sent from one program to another, but are very helpful in a configuration file that may be edited by hand.

The YAML format is oriented towards configuration files just like TOML. For many purposes, however, YAML is an overly complex solution. TOML aims for simplicity, a goal which is not apparent in the YAML specification:

The INI format is also frequently used for configuration files. The format is not standardized, however, and usually does not handle more than one or two levels of nesting.


While I can not speak for the Rust authors, having used the different formats in my own projects (as well as JSON variants such as HCL) I believe they made the right choice.

I don't think they are. Especially security issues aren't emphasized enough. The biggest issue is that YAML attempts to be many things to many people. It's JSON, it's a serialization format, it's human readable, etc. I've been reading the mailing list for YAML for quite some time now.

To me YAML has become F-35 of the ML formats. That is to say overly complex, does many things and isn't really good at any particular thing. I mean, can YAML parser beat JSON parser at parsing JSON (I don't think it is possible, simply because YAML has more states)?
butwhy  rust  cargo  json  configfile  inifile 
april 2017 by kme
Why can't I JSON-serialize a NumPy array that I've converted to a normal list in Python? - Quora
The elements of the list specifying the contents of sparse matrices are if data type numpy 32-bit ints. When I convert them to normal ints, json can handle them fine.
python  json  annoyance  numpy  serialization 
february 2017 by kme
python - How to response a unicode string in flask restful api? - Stack Overflow
make_response can actually solve the problem.

My problem was that I wanted to return raw JSON, instead of having my JSON (re)interpreted as a string, with double-quotes escaped and so forth.
json  flask  flask_restful  rest  api  webdevel  solution 
february 2017 by kme
python - Pandas dataframe to json without index - Stack Overflow
You can use orient='records'

print df.reset_index().to_json(orient='records')

{"id":0,"location":"[50, 50]"},
{"id":1,"location":"[60, 60]"},
{"id":2,"location":"[70, 70]"},
{"id":3,"location":"[80, 80]"}
pandas  json  webdevel  solution 
february 2017 by kme
python - jsonify a SQLAlchemy result set in Flask - Stack Overflow
def serialize_many2many(self):
Return object's relations in easily serializeable format.
NB! Calls many2many's serialize property.
return [ item.serialize for item in self.many2many]

And now for views I can just do:

return jsonify(json_list=[i.serialize for i in qryresult.all()])
flask  jsonify  json  serialization  webdevel  solution 
february 2017 by kme
python - How to serialize SqlAlchemy result to JSON? - Stack Overflow
class User:
def as_dict(self):
return { getattr(self, for c in self.__table__.columns}
flask  python  sqlalchemy  json  serialization  solution 
july 2016 by kme
What is the correct JSON content type? - Stack Overflow
PHP developers use this:

header("Content-type: application/json");

// Do
json  webdevel  content-type  solution 
may 2016 by kme
Xidel - HTML/XML/JSON data extraction tool
Easier to use than some of its counterparts:

<code class="language-bash">xidel -e //title</code>
Pronounciation: To say the name "Xidel" in English, you say "excited" with a silent "C" and "D", followed by an "L". In German, you just say it as it is written.

Mirrored (?) at:
Source code at:
FAQ at:
macOS build instructions: (
textprocessing  html  xml  json  datamunging  extraction  importexport  cli  commandline  utility  software  xpath  xslt  alternativeto  xmlstarlet 
march 2016 by kme
jquery - load json into variable - Stack Overflow
NB: You get the message "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help" in the console when you use this.
var json = (function () {
var json = null;
'async': false,
'global': false,
'url': my_url,
'dataType': "json",
'success': function (data) {
json = data;
return json;
jquery  json  synchronous  xhr  webdevel  javascript  solution 
june 2014 by kme
« earlier      
per page:    204080120160

Copy this bookmark:

to read