Skip to content

Instantly share code, notes, and snippets.

@fge
fge / animals.json
Created February 26, 2013 11:24
animals with additionalProperties allowed
{
"$schema": "http://json-schema.org/draft-04/schema#",
"oneOf": [
{
"description": "a single animal",
"$ref": "#/definitions/animal"
},
{
"description": "a collection of animals",
"type": "array",
/*
* Copyright (c) 2013, Francis Galiegue <fgaliegue@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Lesser GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
/*
* Copyright (c) 2013, Francis Galiegue <fgaliegue@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Lesser GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
/*
* Copyright (c) 2013, Francis Galiegue <fgaliegue@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Lesser GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
/*
* Copyright (c) 2013, Francis Galiegue <fgaliegue@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Lesser GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
package com.github.fge.jacksontree.value;
import com.fasterxml.jackson.core.JsonToken;
import com.fasterxml.jackson.core.TreeNode;
import com.github.fge.jacksontree.base.AbstractJacksonNode;
import com.github.fge.jacksontree.base.JacksonNode;
import com.github.fge.jacksontree.base.MutableNode;
import com.google.common.collect.Iterators;
import java.util.Iterator;
package com.github.fge.jsonschema;
import com.fasterxml.jackson.databind.JsonNode;
import com.github.fge.jackson.JsonLoader;
import com.github.fge.jackson.jsonpointer.JsonPointer;
import com.google.common.collect.Lists;
import java.io.IOException;
import java.util.List;
package com.github.fge.jsonschema;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.github.fge.jackson.JacksonUtils;
import com.github.fge.jackson.JsonLoader;
import com.github.fge.jackson.jsonpointer.JsonPointer;
import com.google.common.collect.Lists;
import java.io.IOException;
@fge
fge / Test.java
Last active December 18, 2015 09:38
Anonymous overloading in Java
package com.github.fge.uritemplate;
public final class Test
{
public static class A
{
public static final int x = 1;
public int m(A a, B b)
{
@fge
fge / schema.json
Last active December 18, 2015 16:39
{
"$schema": "http://json-schema.org/draftv4/schema#",
"type": "object",
"required": [ "name", "mods" ],
"additionalProperties": false,
"properties": {
"name": { "type": "string", "minLength": 1 },
"mods": {
"type": "array",
"minItems": 1,