Skip to content
#

JSON

json logo

JSON (JavaScript Object Notation) is a standard file format that uses text to communicate data objects to array data types. This notation makes it easy for applications to parse and generate files. JSON grew out of the need to have a real-time server-to-web browser communication.

Here are 17,568 public repositories matching this topic...

prettier
sheetjs
jethmalani
jethmalani commented Nov 14, 2017

What did you do?

When I do this (from your docs):

guard let dataFromString = text.data(using: .utf8, allowLossyConversion: false) else {return} let json = JSON(data: dataFromString)

I get an error "Call can throw, but it is not marked with 'try' and the error is not handled"

I did this. I just want to confirm that is right. It worked for me.

`guard let dataFromString

fastapi
Morriz
Morriz commented Apr 18, 2020

Your documentation shows no way to replace an objects value. Any updates to an object with:

db.get(name).find(selectors).assign(data).write()

merges the data with the existing object...not what I'd expect.

How can we replace a record without merging? Can you update your docs?

simdjson
fx
antonmedv
antonmedv commented Dec 11, 2019

Currently, each argument to fx treated as an anonymous function. Here is an example:

fx 'groupBy("commit.author.name")' 'mapValues(size)' toPairs 'sortBy(1)' reverse 'take(10)' fromPairs

But this requires a lot of ' quotes. My idea is to split the argument by whitespaces . So next will be possible to write:

fx 'groupBy("commit.author.name") mapValues(size) toPairs so
rajsite
rajsite commented Feb 11, 2020

I'm upgrading a build environment from python 2 to python 3 and noticed that endpoints with seeded random numbers are not returning the same values. It seems to be related to usage of randint:
https://github.com/postmanlabs/httpbin/blob/f8ec666b4d1b654e4ff6aedd356f510dcac09f83/httpbin/core.py#L1448

It seems like randint is not seed safe and it looks like only random() is: https://bugs.python.o

temp3l
temp3l commented Dec 25, 2019

reproduce:

  • try a schema without "properties" keyword in the playground
  • and a initial-formData of type object ...

=> make sure the formData is a string to have it fixed

Warning: Failed prop type: Invalid prop `value` supplied to `TextWidget`.
    in TextWidget
    in Unknown (created by StringField)
    in StringField (created by SchemaField)
    in div (created by WrapI
zachelrath
zachelrath commented Jul 9, 2019

Currently, when SortMapKeys is set to true in Config, map keys are sorted using a standard alphanumeric sort. It should be possible to specify a custom map key sorting function to use, in order to prioritize certain map keys over others.

Example: Standard SortMapKeys behavior:

cfg := jsoniter.Config{
   SortMapKeys: true,
}.Froze()

m := map[string]int{
   "beta": 2,
   "alp

Created by Douglas Crockford

Released 2005

Website
www.json.org
Wikipedia
Wikipedia
You can’t perform that action at this time.