001package org.hl7.fhir.utilities.json.model;
002
003public class JsonProperty {
004  private String name;
005  private JsonElement value;
006  
007  boolean noComma; // parse in Json5 mode, but records this so the validator can complain
008  boolean unquotedName;
009  boolean unquotedValue;
010  
011  public JsonProperty(String name, JsonElement value) {
012    super();
013    this.name = name;
014    this.value = value;
015  }
016
017  public String getName() {
018    return name;
019  }
020
021  public JsonElement getValue() {
022    return value;
023  }
024
025  public void setValue(JsonElement value) {
026    this.value = value;
027  }
028
029  public boolean isNoComma() {
030    return noComma;
031  }
032
033  public void setNoComma(boolean noComma) {
034    this.noComma = noComma;
035  }
036
037  public boolean isUnquotedName() {
038    return unquotedName;
039  }
040
041  public void setUnquotedName(boolean unquotedName) {
042    this.unquotedName = unquotedName;
043  }
044
045  public boolean isUnquotedValue() {
046    return unquotedValue;
047  }
048
049  public void setUnquotedValue(boolean unquotedValue) {
050    this.unquotedValue = unquotedValue;
051  }
052
053  @Override
054  public String toString() {
055    return "\""+name+"\" : "+value.toString();
056  }
057  
058}