title: How to ignore specific values when applying json_encode to class
body: <p>Is there a way to ignore specific class attributes of a class in php when encoding to json.</p>
  
  <p>For example in java with the jackson library I can annotate globals with @JsonIgnore to achieve this. Is there anything comparable (preferably native) in php??</p>