Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

JSON Generator

Blake edited this page Jun 8, 2017 · 28 revisions

JSON generator code for Samples sample JSON

[
  '{{repeat(100, 100)}}',
  {
    sample_id: '{{index()}}',
    study_id: '{{integer(0001, 0025)}}',
    study_name: '{{random("Iowa Well Monitoring Study", "EPA Distribution Study", "MDH Storm Water Irrigation", "Storm Water UWM", "GLRI", "Iowa DNR Beach Study 2016", "Kewuanee County Study" )}}',
    collab_sample_id: '{{integer(1000, 9000)}}',
    orig_collab_samp_id: '{{integer(1000, 9000)}}',
    collect_start_date: '{{date(new Date(2012, 0, 1), new Date(), "YYYY-MM-ddThh:mm:ss Z")}}',
    collect_end_date: '{{date(new Date(2012, 0, 1), new Date(), "YYYY-MM-ddThh:mm:ss Z")}}',
    samp_desc: '{{lorem(1, "sentences")}}',
    samp_vol_filt:'{{floating(0, 5, 2)}}',
    filter_type: '{{random("Combined GW & PF", "Button Air Sampler", "None (wastewater , manure or biosolid)", "Glass Wool", "None (sediment)", "Pre-filter", "Ultrafilter" )}}',
    collect_start_time: '{{date(new Date(2012, 0, 1), new Date(), "H:m")}}',
    collect_end_time: '{{date(new Date(2012, 0, 1), new Date(), "H:m")}}',
    filt_bornon_date:'{{date(new Date(2012, 0, 1), new Date(), "YYYY-MM-d")}}',
    study_site_name:'{{lorem(1, "words")}}',
    study_site_id:'{{lorem(1, "words")}}',
    sampler_name:  '{{random("afirnstahl", "jpstokdyk", "sspencer")}}',
    sample_notes: '{{lorem(1, "sentences")}}',
    imr:'{{floating(0, 230, 1)}}',
    fmr:'{{floating(1, 800, 1)}}',
    units:'{{random("Gal", "L")}}',
    sample_type:'{{integer(0, 15)}}',
    sample_loc_type:'{{integer(0, 15)}}',
    samp_env_type:'{{integer(0, 15)}}',
    water_type:'{{integer(0, 15)}}',
    init_vol:'{{integer(200, 650)}}',
    tvs_units:'{{random("Gal", "L")}}',
    tvs_stage: '{{integer(100, 800)}}',
    tvs: '{{floating(0, 1005, 4)}}',
    tvs_liters:'{{floating(600, 825, 4)}}',
    tvs_calc:'{{floating(0, 1200, 4)}}',
    tvs_stage_calc:'{{floating(150, 1500, 4)}}',
    matrix: '{{random("water", "wastewater")}}',
    filter_flag: '{{random("Y", "N")}}',
    secondary_conc_flag: '{{random("Y", "N")}}',
    insert_date:'{{date(new Date(2012, 0, 1), new Date(), "YYYY-MM-ddThh:mm:ss Z")}}',
    insert_user:'{{random("afirnstahl", "jpstokdyk", "sspencer", "legacy data upload")}}',
    update_date:'{{date(new Date(2012, 0, 1), new Date(), "YYYY-MM-ddThh:mm:ss Z")}}',
    update_user:'{{random("afirnstahl", "jpstokdyk", "sspencer")}}',
    arrive_date:'{{date(new Date(2012, 0, 1), new Date(), "YYYY-MM-d")}}',
    arrive_notes:'{{lorem(1, "sentences")}}',
    elute_date:'{{date(new Date(2012, 0, 1), new Date(), "YYYY-MM-d")}}',
    elute_notes:'{{lorem(1, "sentences")}}',
    tech_init:'{{random("sks", "js", "AF")}}',
    air_subsample_vol_ml:'{{floating(0, 1000, 2)}}',
    vol_post_dilution_ul:'{{floating(0, 1000, 2)}}',
    pump_rate: '{{floating(0, 1000, 2)}}'
  }

]
Clone this wiki locally