Help Converting JSON to SQL Format

  • Hi Community,

    Can someone help convert the attached JSON file to SQL Format.

    You will notice there are a quite a number of columns. I have attempted to convert the column "Keywords" using the following code:

     SELECT report.*
    FROM OPENROWSET(BULK N'C:\Users\Carlton\Documents\caplogic\DATA\myjson.json', SINGLE_CLOB) AS j
    CROSS APPLY
    OPENJSON(BulkColumn, N'$keywords.columns')
    WITH
    (
    [column] INT '$.keywords'
    , [score] INT '$.score'
    , [length] INT '$.length'
    ) AS report;

    However, I keep on getting error

    Incorrect syntax near '$.keywords'.

    Can someone help convert the JSON in the attached.

    I appreciate there is a lot, so if someone could point me in right direction, that would be great

    Thanks

    • This topic was modified 2 years, 4 months ago by  carlton 84646. Reason: update question
    Attachments:
    You must be logged in to view attached files.
  • Hi Community

    I just realised the file wasn't attached.

  • not really knowing how to work with json I got the following

    the error itself is because you are missing the "." after the "$"

    but even with fixing that I was getting no output so I managed to build the following - ugly and maybe not the correct/best way to do it.

    select t2.keyword
    , t2.score
    from (select *
    from openjson(@Json)
    with (keywords nvarchar(max) as json)
    ) t
    cross apply openjson(t.keywords)
    with (keyword varchar(200)
    , score decimal(20, 10)

    ) t2
  • Hi All,

    Thanks for helping me with this.

    I managed to get what I need using the following site

    https://blog.sqlizer.io/posts/convert-json-to-sql/

  • mind posting the converted sql? would be interesting to see it.

  • Hi Frederico

    I was looking at the converted sql in a bit more detail and it looks like it didn't work.

    See the attachffed.

    Can you help me

    • This reply was modified 2 years, 4 months ago by  carlton 84646. Reason: add file
    Attachments:
    You must be logged in to view attached files.
  • yeah. I had a look at it after I had cutdown your file and they don't really supply a sql statement to parse the json - but rather they just supply a table definition and generate insert statements onto it.

    there are some here on forums that do know a bit of parsing json - maybe one of them notices this.

     

    in meantime what exactly are you trying to do with these files? is it a full parsing or just a partial extract of data required?

  • frederico,

    Thanks for sticking with me on this.

    I guess I want to get the full parsing.

    Can you help with that?

  • have a look at this https://www.red-gate.com/simple-talk/blogs/consuming-hierarchical-json-documents-sql-server-using-openjson/

    and at this one as well https://levelup.gitconnected.com/how-to-easily-parse-and-transform-json-in-sql-server-c0b091a964de?gi=43cf6b573d1b

    and just as some examples of the hell that Json is on sql  - based on the function supplied on the first link

    I do believe you sill need to do multiple passes

    select t.Element_ID
    , t.SequenceNo
    , t.Parent_ID
    , t.Object_ID
    , t.Name
    , t.StringValue
    , t.ValueType
    from HierarchyFromJSON(@Json) t
    order by t.Element_ID


    select *
    from (select companyId
    , max(keywords) as keywords
    , max(financials) as financials
    , max(industries) as industries
    , max(websites) as websites
    , max(officers) as officers
    , max(shareholders) as shareholders
    , max(groupParents) as groupparents
    , max(groupSubsidiaries) as groupsubsidiaries
    , max(statements) as statements
    , max(personsOfSignificantControl) as personsofsignificantcontrol
    from (select *
    -- below are the top level arrays - those will contain the data as well as other arrays which would need similar processing to extract
    from openjson(@Json)
    with (companyId nvarchar(max)
    , keywords nvarchar(max) as json
    , financials nvarchar(max) as json
    , industries nvarchar(max) as json
    , websites nvarchar(max) as json
    , officers nvarchar(max) as json
    , shareholders nvarchar(max) as json
    , groupParents nvarchar(max) as json
    , groupSubsidiaries nvarchar(max) as json
    , statements nvarchar(max) as json
    , personsOfSignificantControl nvarchar(max) as json
    )

    ) t
    group by t.companyId
    ) main
    cross apply openjson(main.keywords)
    with (keyword varchar(200)
    , score decimal(20, 10)

    ) t2
    cross apply openjson(main.financials)
    with (turnover_value varchar(200) '$.turnover.value'
    , turnover_deltaAbsolute varchar(200) '$.turnover.deltaAbsolute'
    , turnover_deltaPercentage varchar(200) '$.turnover.deltaPercentage'
    , turnover_threeYearCAGR varchar(200) '$.turnover.threeYearCAGR'
    , turnover_fiveYearCAGR varchar(200) '$.turnover.fiveYearCAGR'
    , turnover_tenYearCAGR varchar(200) '$.turnover.tenYearCAGR'

    ) t3
  • Hi Frederico,

    Those are some great links, thanks

    As regards your code, I'm getting the following errors:

    1 Incorrect syntax near the keyword 'as'. 28 48

    2 Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon. SQL1.sql 44 13

    3 Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon. SQL1.sql 49 13

     

    Not sure what I'm doing wrong

  • if you have the error with the following then its either your sql version or the compatibility level. - compatibility level must be 130 or higher

    select * from openjson(@Json)

    WITH

    (

    country varchar(200) '$."countryCode"'

    , companyId varchar(200)

    )

  • carlton 84646 wrote:

    Hi Frederico

    I was looking at the converted sql in a bit more detail and it looks like it didn't work.

    See the attachffed.

    Can you help me

    They flattened the JSON into a single table.  Not too useful imo as a starting point for creating a normalized model.  A free and maybe more useful way could be to use Visual Studio to create C# classes as an intermediate step.  Then to create SQL Server code from C# there is a Stack Overflow answer (+1 from me) which is pretty reasonable and simple.  I've done this before with ok results imo.  If you copy JSON into the clipboard and then in Visual Studio use Paste Special>"Paste JSON as Classes" the results of the OP's file are as follows.  I didn't type any of it because it was all copy/paste special

    pasteasjson

    This is the Stack Overflow answer

    public class Rootobject
    {
    public Class1[] Property1 { get; set; }
    }

    public class Class1
    {
    public string countryCode { get; set; }
    public string companyId { get; set; }
    public Pagination pagination { get; set; }
    public Keyword[] keywords { get; set; }
    public Financial[] financials { get; set; }
    public object filters { get; set; }
    public Industry[] industries { get; set; }
    public Website[] websites { get; set; }
    public Officer[] officers { get; set; }
    public int totalCompanyShares { get; set; }
    public Shareholder[] shareholders { get; set; }
    public Groupparent[] groupParents { get; set; }
    public Groupsubsidiary[] groupSubsidiaries { get; set; }
    public object[] statements { get; set; }
    public Personsofsignificantcontrol[] personsOfSignificantControl { get; set; }
    }

    public class Pagination
    {
    public int offset { get; set; }
    public int limit { get; set; }
    public int total { get; set; }
    }

    public class Keyword
    {
    public string keyword { get; set; }
    public float score { get; set; }
    }

    public class Financial
    {
    public string accountsDate { get; set; }
    public int reportingPeriod { get; set; }
    public string currency { get; set; }
    public bool consolidatedAccounts { get; set; }
    public string auditQualification { get; set; }
    public Numberofemployees numberOfEmployees { get; set; }
    public Turnover turnover { get; set; }
    public Costofsales costOfSales { get; set; }
    public Sgaplusothernetcosts sgaPlusOtherNetCosts { get; set; }
    public Operatingprofit operatingProfit { get; set; }
    public Interestreceivable interestReceivable { get; set; }
    public Interestpayable interestPayable { get; set; }
    public Pretaxprofit preTaxProfit { get; set; }
    public Taxation taxation { get; set; }
    public Posttaxprofit postTaxProfit { get; set; }
    public Dividendspayable dividendsPayable { get; set; }
    public Retainedprofits retainedProfits { get; set; }
    public Intangibleassets intangibleAssets { get; set; }
    public Tangibleassets tangibleAssets { get; set; }
    public Investmentsandotherassets investmentsAndOtherAssets { get; set; }
    public Fixedassets fixedAssets { get; set; }
    public Stock stock { get; set; }
    public Tradedebtors tradeDebtors { get; set; }
    public Otherdebtors otherDebtors { get; set; }
    public Miscellaneouscurrentassets miscellaneousCurrentAssets { get; set; }
    public Cash cash { get; set; }
    public Currentassets currentAssets { get; set; }
    public Totalassets totalAssets { get; set; }
    public Bankloansandoverdrafts bankLoansAndOverdrafts { get; set; }
    public Tradecreditors tradeCreditors { get; set; }
    public Miscellaneouscurrentliabilities miscellaneousCurrentLiabilities { get; set; }
    public Othershorttermfinances otherShortTermFinances { get; set; }
    public Currentliabilities currentLiabilities { get; set; }
    public Contingentliabilities contingentLiabilities { get; set; }
    public Otherlongtermfinances otherLongTermFinances { get; set; }
    public Totallongtermliabilities totalLongTermLiabilities { get; set; }
    public Totalliabilities totalLiabilities { get; set; }
    public Netassets netAssets { get; set; }
    public Equitypaidup equityPaidUp { get; set; }
    public Revaluationreserve revaluationReserve { get; set; }
    public Sundryreserves sundryReserves { get; set; }
    public Profitandlossaccountreserve profitAndLossAccountReserve { get; set; }
    public Shareholderfunds shareholderFunds { get; set; }
    public Depreciation depreciation { get; set; }
    public Amortisationofintangibles amortisationOfIntangibles { get; set; }
    public Ebitda ebitda { get; set; }
    public Workingcapital workingCapital { get; set; }
    public Capitalemployed capitalEmployed { get; set; }
    public Wagesandsalaries wagesAndSalaries { get; set; }
    public Directorsemoluments directorsEmoluments { get; set; }
    public Auditfees auditFees { get; set; }
    public Bankoverdraftandlongtermloans bankOverdraftAndLongTermLoans { get; set; }
    public Netcashflowfromoperations netCashFlowFromOperations { get; set; }
    public Netcashflowbeforefinancing netCashFlowBeforeFinancing { get; set; }
    public Netcashflowfromfinancing netCashFlowFromFinancing { get; set; }
    public Increaseincash increaseInCash { get; set; }
    public Debtordays debtorDays { get; set; }
    public Exports exports { get; set; }
    public Grossmarginpercentage grossMarginPercentage { get; set; }
    public Operatingprofitmarginpercentage operatingProfitMarginPercentage { get; set; }
    public Ebitdamarginpercentage ebitdaMarginPercentage { get; set; }
    public Pretaxprofitmarginpercentage preTaxProfitMarginPercentage { get; set; }
    public Netmarginpercentage netMarginPercentage { get; set; }
    public Returnonassetspercentage returnOnAssetsPercentage { get; set; }
    public Returnoncapitalemployedpercentage returnOnCapitalEmployedPercentage { get; set; }
    public Returnonequity returnOnEquity { get; set; }
    public Currentratio currentRatio { get; set; }
    public Cashtocurrentliabilitiesratio cashToCurrentLiabilitiesRatio { get; set; }
    public Cashtototalassetspercentage cashToTotalAssetsPercentage { get; set; }
    public Liquidityratio liquidityRatio { get; set; }
    public Gearingpercentageonliabilitybasis gearingPercentageOnLiabilityBasis { get; set; }
    public Gearingpercentageongrossdebtbasis gearingPercentageOnGrossDebtBasis { get; set; }
    public Gearingpercentageonnetdebtbasis gearingPercentageOnNetDebtBasis { get; set; }
    public Debttocapitalpercentage debtToCapitalPercentage { get; set; }
    public Inventoryturnoverratio inventoryTurnoverRatio { get; set; }
    public Cashtoturnoverratio cashToTurnoverRatio { get; set; }
    public Cashtoturnoverpercentage cashToTurnoverPercentage { get; set; }
    public Daysinventoryoutstanding daysInventoryOutstanding { get; set; }
    public Dayssalesoutstanding daysSalesOutstanding { get; set; }
    public Dayspayableoutstanding daysPayableOutstanding { get; set; }
    public Cashconversioncycle cashConversionCycle { get; set; }
    public Revenueperemployee revenuePerEmployee { get; set; }
    public Humancapitalvalueadded humanCapitalValueAdded { get; set; }
    public Interestcoverageratio interestCoverageRatio { get; set; }
    public Netdebttoebitdaratio netDebtToEBITDARatio { get; set; }
    public Cfotosalesratio cfoToSalesRatio { get; set; }
    public Auditor auditor { get; set; }
    public Jointauditor jointAuditor { get; set; }
    public Solicitor solicitor { get; set; }
    public Accountant accountant { get; set; }
    }

    public class Numberofemployees
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Turnover
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Costofsales
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Sgaplusothernetcosts
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float? threeYearCAGR { get; set; }
    public float? fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Operatingprofit
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float? threeYearCAGR { get; set; }
    public float? fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Interestreceivable
    {
    public int? value { get; set; }
    public int? deltaAbsolute { get; set; }
    public float? deltaPercentage { get; set; }
    public float? threeYearCAGR { get; set; }
    public float? fiveYearCAGR { get; set; }
    public object tenYearCAGR { get; set; }
    }

    public class Interestpayable
    {
    public int? value { get; set; }
    public int? deltaAbsolute { get; set; }
    public float? deltaPercentage { get; set; }
    public object threeYearCAGR { get; set; }
    public object fiveYearCAGR { get; set; }
    public object tenYearCAGR { get; set; }
    }

    public class Pretaxprofit
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Taxation
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float? threeYearCAGR { get; set; }
    public object fiveYearCAGR { get; set; }
    public object tenYearCAGR { get; set; }
    }

    public class Posttaxprofit
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Dividendspayable
    {
    public int? value { get; set; }
    public object deltaAbsolute { get; set; }
    public object deltaPercentage { get; set; }
    public float? threeYearCAGR { get; set; }
    public float? fiveYearCAGR { get; set; }
    public object tenYearCAGR { get; set; }
    }

    public class Retainedprofits
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float? threeYearCAGR { get; set; }
    public float? fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Intangibleassets
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float? fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Tangibleassets
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float tenYearCAGR { get; set; }
    }

    public class Investmentsandotherassets
    {
    public int? value { get; set; }
    public int? deltaAbsolute { get; set; }
    public float? deltaPercentage { get; set; }
    public object threeYearCAGR { get; set; }
    public object fiveYearCAGR { get; set; }
    public object tenYearCAGR { get; set; }
    }

    public class Fixedassets
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float tenYearCAGR { get; set; }
    }

    public class Stock
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float tenYearCAGR { get; set; }
    }

    public class Tradedebtors
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Otherdebtors
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float tenYearCAGR { get; set; }
    }

    public class Miscellaneouscurrentassets
    {
    public object value { get; set; }
    public object deltaAbsolute { get; set; }
    public object deltaPercentage { get; set; }
    public object threeYearCAGR { get; set; }
    public object fiveYearCAGR { get; set; }
    public object tenYearCAGR { get; set; }
    }

    public class Cash
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float tenYearCAGR { get; set; }
    }

    public class Currentassets
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float tenYearCAGR { get; set; }
    }

    public class Totalassets
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float tenYearCAGR { get; set; }
    }

    public class Bankloansandoverdrafts
    {
    public object value { get; set; }
    public object deltaAbsolute { get; set; }
    public object deltaPercentage { get; set; }
    public object threeYearCAGR { get; set; }
    public object fiveYearCAGR { get; set; }
    public object tenYearCAGR { get; set; }
    }

    public class Tradecreditors
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Miscellaneouscurrentliabilities
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float tenYearCAGR { get; set; }
    }

    public class Othershorttermfinances
    {
    public int value { get; set; }
    public int? deltaAbsolute { get; set; }
    public float? deltaPercentage { get; set; }
    public float? threeYearCAGR { get; set; }
    public float? fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Currentliabilities
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float tenYearCAGR { get; set; }
    }

    public class Contingentliabilities
    {
    public object value { get; set; }
    public object deltaAbsolute { get; set; }
    public object deltaPercentage { get; set; }
    public object threeYearCAGR { get; set; }
    public object fiveYearCAGR { get; set; }
    public object tenYearCAGR { get; set; }
    }

    public class Otherlongtermfinances
    {
    public int? value { get; set; }
    public int? deltaAbsolute { get; set; }
    public float? deltaPercentage { get; set; }
    public object threeYearCAGR { get; set; }
    public object fiveYearCAGR { get; set; }
    public object tenYearCAGR { get; set; }
    }

    public class Totallongtermliabilities
    {
    public int? value { get; set; }
    public int? deltaAbsolute { get; set; }
    public float? deltaPercentage { get; set; }
    public object threeYearCAGR { get; set; }
    public object fiveYearCAGR { get; set; }
    public object tenYearCAGR { get; set; }
    }

    public class Totalliabilities
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float tenYearCAGR { get; set; }
    }

    public class Netassets
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float? fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Equitypaidup
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public int deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float tenYearCAGR { get; set; }
    }

    public class Revaluationreserve
    {
    public object value { get; set; }
    public object deltaAbsolute { get; set; }
    public object deltaPercentage { get; set; }
    public object threeYearCAGR { get; set; }
    public object fiveYearCAGR { get; set; }
    public object tenYearCAGR { get; set; }
    }

    public class Sundryreserves
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public int deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float tenYearCAGR { get; set; }
    }

    public class Profitandlossaccountreserve
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float? fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Shareholderfunds
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float? fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Depreciation
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Amortisationofintangibles
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float? fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Ebitda
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float? threeYearCAGR { get; set; }
    public float? fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Workingcapital
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float? threeYearCAGR { get; set; }
    public float? fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Capitalemployed
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float? fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Wagesandsalaries
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Directorsemoluments
    {
    public int? value { get; set; }
    public int? deltaAbsolute { get; set; }
    public float? deltaPercentage { get; set; }
    public float? threeYearCAGR { get; set; }
    public float? fiveYearCAGR { get; set; }
    public object tenYearCAGR { get; set; }
    }

    public class Auditfees
    {
    public int value { get; set; }
    public int deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Bankoverdraftandlongtermloans
    {
    public int? value { get; set; }
    public int? deltaAbsolute { get; set; }
    public float? deltaPercentage { get; set; }
    public object threeYearCAGR { get; set; }
    public object fiveYearCAGR { get; set; }
    public object tenYearCAGR { get; set; }
    }

    public class Netcashflowfromoperations
    {
    public object value { get; set; }
    public object deltaAbsolute { get; set; }
    public object deltaPercentage { get; set; }
    public object threeYearCAGR { get; set; }
    public object fiveYearCAGR { get; set; }
    public object tenYearCAGR { get; set; }
    }

    public class Netcashflowbeforefinancing
    {
    public object value { get; set; }
    public object deltaAbsolute { get; set; }
    public object deltaPercentage { get; set; }
    public object threeYearCAGR { get; set; }
    public object fiveYearCAGR { get; set; }
    public object tenYearCAGR { get; set; }
    }

    public class Netcashflowfromfinancing
    {
    public object value { get; set; }
    public object deltaAbsolute { get; set; }
    public object deltaPercentage { get; set; }
    public object threeYearCAGR { get; set; }
    public object fiveYearCAGR { get; set; }
    public object tenYearCAGR { get; set; }
    }

    public class Increaseincash
    {
    public object value { get; set; }
    public object deltaAbsolute { get; set; }
    public object deltaPercentage { get; set; }
    public object threeYearCAGR { get; set; }
    public object fiveYearCAGR { get; set; }
    public object tenYearCAGR { get; set; }
    }

    public class Debtordays
    {
    public float value { get; set; }
    public float deltaAbsolute { get; set; }
    public float deltaPercentage { get; set; }
    public float threeYearCAGR { get; set; }
    public float fiveYearCAGR { get; set; }
    public float? tenYearCAGR { get; set; }
    }

    public class Exports
    {
    public object value { get; set; }
    public object deltaAbsolute { get; set; }
    public object deltaPercentage { get; set; }
    public object threeYearCAGR { get; set; }
    public object fiveYearCAGR { get; set; }
    public object tenYearCAGR { get; set; }
    }

    public class Grossmarginpercentage
    {
    public float value { get; set; }
    }

    public class Operatingprofitmarginpercentage
    {
    public float value { get; set; }
    }

    public class Ebitdamarginpercentage
    {
    public float value { get; set; }
    }

    public class Pretaxprofitmarginpercentage
    {
    public float value { get; set; }
    }

    public class Netmarginpercentage
    {
    public float value { get; set; }
    }

    public class Returnonassetspercentage
    {
    public float value { get; set; }
    }

    public class Returnoncapitalemployedpercentage
    {
    public float value { get; set; }
    }

    public class Returnonequity
    {
    public float value { get; set; }
    }

    public class Currentratio
    {
    public float value { get; set; }
    }

    public class Cashtocurrentliabilitiesratio
    {
    public float value { get; set; }
    }

    public class Cashtototalassetspercentage
    {
    public float value { get; set; }
    }

    public class Liquidityratio
    {
    public float value { get; set; }
    }

    public class Gearingpercentageonliabilitybasis
    {
    public float value { get; set; }
    }

    public class Gearingpercentageongrossdebtbasis
    {
    public float value { get; set; }
    }

    public class Gearingpercentageonnetdebtbasis
    {
    public float value { get; set; }
    }

    public class Debttocapitalpercentage
    {
    public float value { get; set; }
    }

    public class Inventoryturnoverratio
    {
    public float value { get; set; }
    }

    public class Cashtoturnoverratio
    {
    public float value { get; set; }
    }

    public class Cashtoturnoverpercentage
    {
    public float value { get; set; }
    }

    public class Daysinventoryoutstanding
    {
    public float value { get; set; }
    }

    public class Dayssalesoutstanding
    {
    public float value { get; set; }
    }

    public class Dayspayableoutstanding
    {
    public float value { get; set; }
    }

    public class Cashconversioncycle
    {
    public float value { get; set; }
    }

    public class Revenueperemployee
    {
    public float value { get; set; }
    }

    public class Humancapitalvalueadded
    {
    public float value { get; set; }
    }

    public class Interestcoverageratio
    {
    public float? value { get; set; }
    }

    public class Netdebttoebitdaratio
    {
    public float value { get; set; }
    }

    public class Cfotosalesratio
    {
    public object value { get; set; }
    }

    public class Auditor
    {
    public string sourceName { get; set; }
    }

    public class Jointauditor
    {
    public object sourceName { get; set; }
    }

    public class Solicitor
    {
    public object sourceName { get; set; }
    }

    public class Accountant
    {
    public object sourceName { get; set; }
    }

    public class Industry
    {
    public string name { get; set; }
    public string code { get; set; }
    public string type { get; set; }
    }

    public class Website
    {
    public string website { get; set; }
    public float score { get; set; }
    }

    public class Officer
    {
    public string officerId { get; set; }
    public string type { get; set; }
    public Person person { get; set; }
    public object company { get; set; }
    public object isShareholder { get; set; }
    public object[] disqualifications { get; set; }
    public Appointment[] appointments { get; set; }
    }

    public class Person
    {
    public string honorific { get; set; }
    public string firstName { get; set; }
    public string middleName { get; set; }
    public string lastName { get; set; }
    public Nationality[] nationalities { get; set; }
    public Dateofbirth dateOfBirth { get; set; }
    }

    public class Dateofbirth
    {
    public int? year { get; set; }
    public int? month { get; set; }
    }

    public class Nationality
    {
    public string demonym { get; set; }
    public string countryCode { get; set; }
    }

    public class Appointment
    {
    public string status { get; set; }
    public string startDate { get; set; }
    public string endDate { get; set; }
    public string officialRole { get; set; }
    public string selfDescribedPosition { get; set; }
    public Serviceaddress serviceAddress { get; set; }
    }

    public class Serviceaddress
    {
    public string fullAddress { get; set; }
    public Structuredaddress structuredAddress { get; set; }
    }

    public class Structuredaddress
    {
    public string premises { get; set; }
    public object thoroughfare { get; set; }
    public object dependentLocality { get; set; }
    public string postTown { get; set; }
    public string county { get; set; }
    public string postcode { get; set; }
    public string countryCode { get; set; }
    }

    public class Shareholder
    {
    public string sourceName { get; set; }
    public int totalShareholding { get; set; }
    public int totalShareholdingPercentage { get; set; }
    public Shareholding[] shareholdings { get; set; }
    public Exactmatch[] exactMatches { get; set; }
    public object[] possibleMatches { get; set; }
    public object notMatched { get; set; }
    }

    public class Shareholding
    {
    public string _class { get; set; }
    public int numberOfShares { get; set; }
    public int percentageOfShares { get; set; }
    public Nominalvalue nominalValue { get; set; }
    }

    public class Nominalvalue
    {
    public int value { get; set; }
    public string currency { get; set; }
    }

    public class Exactmatch
    {
    public string type { get; set; }
    public object person { get; set; }
    public Company company { get; set; }
    }

    public class Company
    {
    public string countryCode { get; set; }
    public string companyId { get; set; }
    public string name { get; set; }
    public string officialStatus { get; set; }
    public string simplifiedStatus { get; set; }
    }

    public class Groupparent
    {
    public string countryCode { get; set; }
    public string companyId { get; set; }
    public string name { get; set; }
    public int degreeOfSeparation { get; set; }
    public bool isImmediateParent { get; set; }
    public bool isUltimateParent { get; set; }
    }

    public class Groupsubsidiary
    {
    public string countryCode { get; set; }
    public string companyId { get; set; }
    public string name { get; set; }
    }

    public class Personsofsignificantcontrol
    {
    public string type { get; set; }
    public Person1 person { get; set; }
    public Company1 company { get; set; }
    public object otherLegalEntity { get; set; }
    public string[] naturesOfControl { get; set; }
    public bool? isShareholder { get; set; }
    public string notifiedAt { get; set; }
    public string ceasedAt { get; set; }
    public Exactmatch1[] exactMatches { get; set; }
    public object[] possibleMatches { get; set; }
    }

    public class Person1
    {
    public string sourceName { get; set; }
    public Serviceaddress1 serviceAddress { get; set; }
    public Nationality1[] nationalities { get; set; }
    public Residency residency { get; set; }
    public Dateofbirth1 dateOfBirth { get; set; }
    }

    public class Serviceaddress1
    {
    public string fullAddress { get; set; }
    }

    public class Residency
    {
    public string countryName { get; set; }
    public string code { get; set; }
    }

    public class Dateofbirth1
    {
    public int year { get; set; }
    public int month { get; set; }
    }

    public class Nationality1
    {
    public string demonym { get; set; }
    public string code { get; set; }
    }

    public class Company1
    {
    public string sourceName { get; set; }
    public Officeaddress officeAddress { get; set; }
    public string registrationNumber { get; set; }
    }

    public class Officeaddress
    {
    public string fullAddress { get; set; }
    }

    public class Exactmatch1
    {
    public string type { get; set; }
    public Person2 person { get; set; }
    public Company2 company { get; set; }
    }

    public class Person2
    {
    public string honorific { get; set; }
    public string firstName { get; set; }
    public object middleName { get; set; }
    public string lastName { get; set; }
    public Nationality2[] nationalities { get; set; }
    public Dateofbirth2 dateOfBirth { get; set; }
    public string officerId { get; set; }
    }

    public class Dateofbirth2
    {
    public int year { get; set; }
    public int month { get; set; }
    }

    public class Nationality2
    {
    public string demonym { get; set; }
    public string countryCode { get; set; }
    }

    public class Company2
    {
    public string countryCode { get; set; }
    public string companyId { get; set; }
    public string name { get; set; }
    public string officialStatus { get; set; }
    public string simplifiedStatus { get; set; }
    }

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply