(a Type, b Type)
| 416 | func (j jsonObject) tryDecode() (JSON, error) { return j, nil } |
| 417 | |
| 418 | func cmpJSONTypes(a Type, b Type) int { |
| 419 | if b > a { |
| 420 | return -1 |
| 421 | } |
| 422 | if b < a { |
| 423 | return 1 |
| 424 | } |
| 425 | return 0 |
| 426 | } |
| 427 | |
| 428 | func (j jsonNull) Compare(other JSON) (int, error) { return cmpJSONTypes(j.Type(), other.Type()), nil } |
| 429 | func (j jsonFalse) Compare(other JSON) (int, error) { return cmpJSONTypes(j.Type(), other.Type()), nil } |