formula: output recommended/optional deps in JSON.
formula: output recommended/optional deps in JSON.

Fixes #47914 by distinguishing between required, optional, and
recommended dependencies when using `brew info --json=v1`. This is done
by adding the `optional_dependencies` and `recommended_dependencies`
fields to the JSON output.

A good example of this fix is `brew info --json=v1 dtrx`.

Closes #48196.

Signed-off-by: Mike McQuaid <a17fed27eaa842282862ff7c1b9c8395a26ac320@mikemcquaid.com>

adamliter/homebrew,adamliter/homebrew,base10/homebrew,gnubila-france/linuxbrew,hakamadare/homebrew,royhodgman/homebrew,Homebrew/homebrew,osimola/homebrew,skatsuta/homebrew,liamstask/homebrew,quantumsteve/homebrew,sakra/homebrew,SteveClement/homebrew,tutumcloud/homebrew,elgertam/homebrew,kodabb/homebrew,ralic/homebrew,youtux/homebrew,OJFord/homebrew,dongcarl/homebrew,josa42/homebrew,chadcatlett/homebrew,cosmo0920/homebrew,dongcarl/homebrew,benjaminfrank/homebrew,quantumsteve/homebrew,haihappen/homebrew,hakamadare/homebrew,ebouaziz/linuxbrew,Homebrew/homebrew,gnubila-france/linuxbrew,base10/homebrew,drewwells/homebrew,saketkc/linuxbrew,Linuxbrew/linuxbrew,hanxue/homebrew,kevinastone/homebrew,optikfluffel/homebrew,dickeyxxx/homebrew,dongcarl/homebrew,eighthave/homebrew,Homebrew/linuxbrew,decors/homebrew,joshfriend/homebrew,mkrapp/homebrew,gicmo/homebrew,alebcay/homebrew,ybott/homebrew,liamstask/homebrew,dplarson/homebrew,mobileoverlord/homebrew-1,sometimesfood/homebrew,yazuuchi/homebrew,ilovezfs/homebrew,LinusU/homebrew,alebcay/homebrew,sakra/homebrew,reelsense/homebrew,sjackman/linuxbrew,josa42/homebrew,ablyler/homebrew,mobileoverlord/homebrew-1,dplarson/homebrew,kodabb/homebrew,marcwebbie/homebrew,osimola/homebrew,tutumcloud/homebrew,dplarson/homebrew,emcrisostomo/homebrew,sjackman/linuxbrew,scpeters/homebrew,tutumcloud/homebrew,muellermartin/homebrew,apjanke/homebrew,drewwells/homebrew,cprecioso/homebrew,osimola/homebrew,ebouaziz/linuxbrew,marcwebbie/homebrew,SuperNEMO-DBD/cadfaelbrew,3van/homebrew,galaxy001/homebrew,johanhammar/homebrew,ear/homebrew,adamliter/homebrew,afh/homebrew,utzig/homebrew,gnubila-france/linuxbrew,keith/homebrew,Angeldude/linuxbrew,pcottle/homebrew,sometimesfood/homebrew,retrography/homebrew,scorphus/homebrew,josa42/homebrew,elgertam/homebrew,Homebrew/linuxbrew,redpen-cc/homebrew,jamer/homebrew,eighthave/homebrew,filcab/homebrew,ralic/homebrew,iostat/homebrew2,pcottle/homebrew,ybott/homebrew,youtux/homebrew,emcrisostomo/homebrew,tschoonj/homebrew,booi/homebrew,haihappen/homebrew,yazuuchi/homebrew,brunchboy/homebrew,pcottle/homebrew,recruit-tech/homebrew,kevinastone/homebrew,keith/homebrew,redpen-cc/homebrew,iostat/homebrew2,ExtremeMan/homebrew,scorphus/homebrew,cprecioso/homebrew,drbenmorgan/linuxbrew,Asuranceturix/homebrew,afh/homebrew,mkrapp/homebrew,pcottle/homebrew,Red54/homebrew,MartinDelille/homebrew,danieroux/homebrew,getgauge/homebrew,recruit-tech/homebrew,scpeters/homebrew,totalvoidness/homebrew,drewwells/homebrew,AlexejK/homebrew,cscetbon/homebrew,sferik/homebrew,reelsense/linuxbrew,OJFord/homebrew,booi/homebrew,AlexejK/homebrew,theeternalsw0rd/homebrew,slyphon/homebrew,deorth/homebrew,gnubila-france/linuxbrew,reelsense/linuxbrew,jsjohnst/homebrew,SuperNEMO-DBD/cadfaelbrew,3van/homebrew,benjaminfrank/homebrew,Angeldude/linuxbrew,esamson/homebrew,johanhammar/homebrew,dalanmiller/homebrew,tschoonj/homebrew,thinker0/homebrew,ybott/homebrew,MartinDelille/homebrew,eighthave/homebrew,esamson/homebrew,saketkc/linuxbrew,gicmo/homebrew,skinny-framework/homebrew,dutchcoders/homebrew,hongkongkiwi/homebrew,DoomHammer/linuxbrew,gawbul/homebrew,lrascao/homebrew,theeternalsw0rd/homebrew,ralic/homebrew,cscetbon/homebrew,dunn/homebrew,kevinastone/homebrew,ilovezfs/homebrew,treyharris/homebrew,cosmo0920/homebrew,osimola/homebrew,SuperNEMO-DBD/cadfaelbrew,bigbes/homebrew,kenips/homebrew,TaylorMonacelli/homebrew,reelsense/homebrew,treyharris/homebrew,keith/homebrew,brunchboy/homebrew,Red54/homebrew,menivaitsi/homebrew,scorphus/homebrew,ryanfb/homebrew,polishgeeks/homebrew,frodeaa/homebrew,cprecioso/homebrew,skinny-framework/homebrew,jarrettmeyer/homebrew,tschoonj/homebrew,sometimesfood/homebrew,scorphus/homebrew,sjackman/linuxbrew,liamstask/homebrew,ablyler/homebrew,SteveClement/homebrew,joshfriend/homebrew,nandub/homebrew,ebouaziz/linuxbrew,hongkongkiwi/homebrew,influxdb/homebrew,sferik/homebrew,ablyler/homebrew,kodabb/homebrew,sometimesfood/homebrew,Asuranceturix/homebrew,hakamadare/homebrew,retrography/homebrew,galaxy001/homebrew,tutumcloud/homebrew,eighthave/homebrew,joshfriend/homebrew,michaKFromParis/homebrew-sparks,Homebrew/homebrew,utzig/homebrew,DoomHammer/linuxbrew,dericed/homebrew,johanhammar/homebrew,Red54/homebrew,kenips/homebrew,optikfluffel/homebrew,jamer/homebrew,jamer/homebrew,totalvoidness/homebrew,retrography/homebrew,vigo/homebrew,sakra/homebrew,marcwebbie/homebrew,benjaminfrank/homebrew,treyharris/homebrew,sferik/homebrew,ExtremeMan/homebrew,jarrettmeyer/homebrew,gicmo/homebrew,Homebrew/homebrew,LinusU/homebrew,muellermartin/homebrew,jsjohnst/homebrew,MoSal/homebrew,thinker0/homebrew,ryanfb/homebrew,thinker0/homebrew,Linuxbrew/linuxbrew,skatsuta/homebrew,kevinastone/homebrew,dutchcoders/homebrew,alebcay/homebrew,jamer/homebrew,Linuxbrew/linuxbrew,bukzor/linuxbrew,cosmo0920/homebrew,brunchboy/homebrew,hanxue/homebrew,polishgeeks/homebrew,recruit-tech/homebrew,BrewTestBot/homebrew,getgauge/homebrew,MoSal/homebrew,emcrisostomo/homebrew,bigbes/homebrew,AlexejK/homebrew,3van/homebrew,saketkc/linuxbrew,jarrettmeyer/homebrew,ilovezfs/homebrew,kenips/homebrew,BrewTestBot/homebrew,gawbul/homebrew,Homebrew/linuxbrew,ear/homebrew,galaxy001/homebrew,base10/homebrew,elyscape/homebrew,menivaitsi/homebrew,utzig/homebrew,drbenmorgan/linuxbrew,ybott/homebrew,Homebrew/linuxbrew,SuperNEMO-DBD/cadfaelbrew,Asuranceturix/homebrew,galaxy001/homebrew,esamson/homebrew,deorth/homebrew,vigo/homebrew,dalanmiller/homebrew,skinny-framework/homebrew,feelpp/homebrew,nandub/homebrew,utzig/homebrew,georgschoelly/homebrew,frodeaa/homebrew,hanxue/homebrew,theeternalsw0rd/homebrew,dickeyxxx/homebrew,retrography/homebrew,SteveClement/homebrew,yazuuchi/homebrew,tschoonj/homebrew,Angeldude/linuxbrew,influxdata/homebrew,kodabb/homebrew,benjaminfrank/homebrew,afh/homebrew,BrewTestBot/homebrew,dalanmiller/homebrew,influxdb/homebrew,SteveClement/homebrew,Asuranceturix/homebrew,booi/homebrew,totalvoidness/homebrew,hongkongkiwi/homebrew,pcottle/homebrew,bukzor/linuxbrew,alebcay/homebrew,drewwells/homebrew,influxdata/homebrew,influxdata/homebrew,reelsense/homebrew,Chilledheart/homebrew,AlexejK/homebrew,recruit-tech/homebrew,menivaitsi/homebrew,skinny-framework/homebrew,Angeldude/linuxbrew,emcrisostomo/homebrew,redpen-cc/homebrew,polishgeeks/homebrew,ebouaziz/linuxbrew,hakamadare/homebrew,skatsuta/homebrew,theeternalsw0rd/homebrew,hanxue/homebrew,sjackman/linuxbrew,dunn/homebrew,gicmo/homebrew,thinker0/homebrew,liamstask/homebrew,nandub/homebrew,Chilledheart/homebrew,totalvoidness/homebrew,brunchboy/homebrew,SteveClement/homebrew,TaylorMonacelli/homebrew,muellermartin/homebrew,youtux/homebrew,bukzor/linuxbrew,nandub/homebrew,lrascao/homebrew,slyphon/homebrew,base10/homebrew,jsjohnst/homebrew,saketkc/linuxbrew,quantumsteve/homebrew,bigbes/homebrew,haihappen/homebrew,mkrapp/homebrew,dickeyxxx/homebrew,ExtremeMan/homebrew,haihappen/homebrew,OJFord/homebrew,dericed/homebrew,reelsense/linuxbrew,jsjohnst/homebrew,Chilledheart/homebrew,filcab/homebrew,mobileoverlord/homebrew-1,michaKFromParis/homebrew-sparks,elgertam/homebrew,Asuranceturix/homebrew,feelpp/homebrew,filcab/homebrew,frodeaa/homebrew,dutchcoders/homebrew,danieroux/homebrew,influxdb/homebrew,DoomHammer/linuxbrew,elyscape/homebrew,drbenmorgan/linuxbrew,DoomHammer/linuxbrew,apjanke/homebrew,apjanke/homebrew,georgschoelly/homebrew,yumitsu/homebrew,afh/homebrew,lrascao/homebrew,apjanke/homebrew,slyphon/homebrew,chadcatlett/homebrew,georgschoelly/homebrew,yazuuchi/homebrew,michaKFromParis/homebrew-sparks,3van/homebrew,royhodgman/homebrew,dunn/homebrew,quantumsteve/homebrew,vigo/homebrew,iostat/homebrew2,feelpp/homebrew,decors/homebrew,ear/homebrew,treyharris/homebrew,TaylorMonacelli/homebrew,dongcarl/homebrew,optikfluffel/homebrew,ryanfb/homebrew,royhodgman/homebrew,sakra/homebrew,Linuxbrew/linuxbrew,adamliter/homebrew,getgauge/homebrew,dunn/homebrew,elgertam/homebrew,johanhammar/homebrew,bukzor/linuxbrew,royhodgman/homebrew,danieroux/homebrew,cprecioso/homebrew,TaylorMonacelli/homebrew,sferik/homebrew,ear/homebrew,cscetbon/homebrew,ExtremeMan/homebrew,hongkongkiwi/homebrew,iostat/homebrew2,esamson/homebrew,cosmo0920/homebrew,influxdb/homebrew,MartinDelille/homebrew,dalanmiller/homebrew,ralic/homebrew,polishgeeks/homebrew,yumitsu/homebrew,jarrettmeyer/homebrew,MartinDelille/homebrew,influxdata/homebrew,dericed/homebrew,vigo/homebrew,dplarson/homebrew,skatsuta/homebrew,BrewTestBot/homebrew,marcwebbie/homebrew,keith/homebrew,LinusU/homebrew,georgschoelly/homebrew,decors/homebrew,kenips/homebrew,elyscape/homebrew,MoSal/homebrew,danieroux/homebrew,reelsense/linuxbrew,LinusU/homebrew,mobileoverlord/homebrew-1,dericed/homebrew,scpeters/homebrew,redpen-cc/homebrew,filcab/homebrew,slyphon/homebrew,reelsense/homebrew,chadcatlett/homebrew,menivaitsi/homebrew,Chilledheart/homebrew,optikfluffel/homebrew,bigbes/homebrew,yumitsu/homebrew,deorth/homebrew,ryanfb/homebrew,OJFord/homebrew,dickeyxxx/homebrew,gawbul/homebrew,feelpp/homebrew,getgauge/homebrew,decors/homebrew,muellermartin/homebrew,frodeaa/homebrew,Red54/homebrew,ablyler/homebrew,youtux/homebrew,dutchcoders/homebrew,elyscape/homebrew,MoSal/homebrew,drbenmorgan/linuxbrew,ilovezfs/homebrew,scpeters/homebrew