{
  "tiers": [
    {
      "trades": [
        {
          "wants": [
            {
              "item": "minecraft:paper",
              "quantity": {
                "min": 24,
                "max": 36
              }
            }
          ],
          "gives": [
            {
              "item": "minecraft:emerald",
              "quantity": 1
            }
          ]
        },
        {
          "wants": [
            {
              "item": "minecraft:emerald",
              "quantity": {
                "min": 5,
                "max": 64
              }
            },
            {
              "item": "minecraft:book",
              "quantity": 1
            }
          ],
          "gives": [
            {
              "item": "minecraft:enchanted_book",
              "functions": [
                {
                  "function": "enchant_book_for_trading",
                  "base_cost": 2,
                  "base_random_cost": 5,
                  "per_level_random_cost": 10,
                  "per_level_cost": 3
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "trades": [
        {
          "wants": [
            {
              "item": "minecraft:book",
              "quantity": {
                "min": 8,
                "max": 10
              }
            }
          ],
          "gives": [
            {
              "item": "minecraft:emerald",
              "quantity": 1
            }
          ]
        },
        {
          "wants": [
            {
              "item": "minecraft:emerald",
              "quantity": {
                "min": 10,
                "max": 12
              }
            }
          ],
          "gives": [
            {
              "item": "minecraft:compass",
              "quantity": 1
            }
          ]
        },
        {
          "wants": [
            {
              "item": "minecraft:emerald",
              "quantity": {
                "min": 3,
                "max": 4
              }
            }
          ],
          "gives": [
            {
              "item": "minecraft:bookshelf",
              "quantity": 1
            }
          ]
        }
      ]
    },
    {
      "trades": [
        //{
        //  "wants": [
        //    {
        //      "item": "minecraft:book", // written book
        //      "quantity": 2
        //    }
        //  ],
        //  "gives": [
        //    {
        //      "item": "minecraft:emerald",
        //      "quantity": 1
        //    }
        //  ]
        //},
        {
          "wants": [
            {
              "item": "minecraft:emerald",
              "quantity": {
                "min": 10,
                "max": 12
              }
            }
          ],
          "gives": [
            {
              "item": "minecraft:clock",
              "quantity": 1
            }
          ]
        },
        {
          "wants": [
            {
              "item": "minecraft:emerald",
              "quantity": 1
            }
          ],
          "gives": [
            {
              "item": "minecraft:glass",
              "quantity": {
                "min": 3,
                "max": 5
              }
            }
          ]
        }
      ]
    },
    {
      "trades": [
        {
          "wants": [
            {
              "item": "minecraft:emerald",
              "quantity": {
                "min": 5,
                "max": 64
              }
            },
            {
              "item": "minecraft:book",
              "quantity": 1
            }
          ],
          "gives": [
            {
              "item": "minecraft:enchanted_book",
              "functions": [
                {
                  "function": "enchant_book_for_trading",
                  "base_cost": 2,
                  "base_random_cost": 5,
                  "per_level_random_cost": 10,
                  "per_level_cost": 3
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "trades": [
        {
          "wants": [
            {
              "item": "minecraft:emerald",
              "quantity": {
                "min": 5,
                "max": 64
              }
            },
            {
              "item": "minecraft:book",
              "quantity": 1
            }
          ],
          "gives": [
            {
              "item": "minecraft:enchanted_book",
              "functions": [
                {
                  "function": "enchant_book_for_trading",
                  "base_cost": 2,
                  "base_random_cost": 5,
                  "per_level_random_cost": 10,
                  "per_level_cost": 3
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "trades": [
        {
          "wants": [
            {
              "item": "minecraft:emerald",
              "quantity": {
                "min": 20,
                "max": 22
              }
            }
          ],
          "gives": [
            {
              "item": "minecraft:name_tag",
              "quantity": 1
            }
          ]
        }
      ]
    }
  ]
}
