Skip to content

BeerJSON

Matt Young edited this page May 29, 2024 · 48 revisions

This is a temporary page to help me track progress mostly on some of the turn-the-handle parts of BeerJSON.

Bugs on Recipe Export/Import round trip of American Barleywine

Most of these stemmed from the difference between FermentableBase and Fermentable. Still need to fix export so recipes in BeerJSON can be read correctly on a different system (ie we need to export ingredients too).

  • OG and FG are changed slightly Fixed
  • Equipment not set By design with BeerJSON
  • Batch size bar not set (but boil size is) Fixed
  • Boil time is 0 Fixed
  • Target boil size is 0 Fixed
  • IBU is slightly changed Fixed
  • Color is slightly wrong Fixed
  • Fermentable additions all have yield 0.0% Fixed
  • Calories / 12oz is changed Fixed
  • Extras > Temps are all 0
  • ABV is changed Fixed

Core

  • Finish JsonRecord::toJson so it can handle writing arrays DONE
  • Extend JsonXPath so it can handle named array elements such as equipment_items[form="Mash Tun"] DONE
  • Extend JsonXPath to do the calling to Boost.JSON so that we replace direct calls to find_pointer. Possibly use new set_at_pointer function too. DONE
  • Upgrade our copy of the BeerJSON schema to the 1.0.2 release at https://github.com/beerjson/beerjson/releases/tag/v1.0.2. (Only small changes.)
  • Finish tidying up XxxTableModel classes (remove BtTableModelData and fix WaterTableModel)
  • Finish JsonRecord::loadChildRecords so it can load records generically
  • Create MashTableModel to replace NamedMashEditor, and merge NamedMashEditor with MashEditor. Change code that uses Mash::tunTemp_c etc to look at Equipment if Mash fields not set. Then retire From Equipment button.
  • Default all Mash instances to having a name, even if it is just Mash for recipeName.
  • Create new "recipe addition" classes to replace "child is use of" idiom in existing code:
    • RecipeAdditionHop
    • RecipeAdditionFermentable
    • RecipeAdditionMisc
    • RecipeAdditionYeast

Turn-the-handle

Model Class Properties etc DB new columns DB mapping BeerXML mapping BeerJSON mapping UI (Editor) Optional Existing
Boil ‡ Done Done Done Done Done Mostly N/A
BoilStep ‡ Done Done Done N/A Done Mostly N/A
BrewNote ⹋
Equipment Done Done Done Done Done Done Done
Hop Done † Done Done Done Done Done Done
Fermentable Done Done Done Done Done Done Done
Fermentation ‡ Done Done Done Done N/A
FermentationStep ‡ Done Done Done Done N/A
Instruction ⹋
Inventory
Mash None! N/A N/A N/A Done N/A Done
MashStep Done Done Done Done Done Done Done
Misc Done Done Done Done Done Done None!
Recipe Done Done Done Done Done Done Done
Salt ⹋
Style Done Done Done Done Done Done Done
Water Done Done Done Done Done Done Done
Yeast Done Done Done Done Done Done Done

Notes

  • "Optional Existing" means make existing required parameters optional when they are already optional in BeerXML

† Still need to extend Hop::amount_kg so we can cope with volumes for extract etc

‡ New classes for BeerJSON

⹋ Outside the scope of BeerJSON (I think)