# Class SmiObjectJsonConverter

java.lang.Object
com.snmp4j.smi.util.json.SmiObjectJsonConverter

public class SmiObjectJsonConverter extends Object
Utility class for converting SmiObject instances and their sub-interfaces to JSON format.

Since:
  2.0
Version:
  2.0
Author:
  Frank Fock

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `toJson(SmiObject smiObject)`
  Converts any SmiObject (or sub-interface) to a JSON string representation.
  `static String`
  `toJsonArray(Collection<? extends SmiObject> objects)`
  Converts a collection of SmiObjects to a JSON array string.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### toJson

    public static String toJson(SmiObject smiObject)
    Converts any SmiObject (or sub-interface) to a JSON string representation.
    Parameters:
      `smiObject` - the SmiObject to convert (can be any sub-interface)
    Returns:
      JSON string representation

  - ### toJsonArray

    public static String toJsonArray(Collection<? extends SmiObject> objects)
    Converts a collection of SmiObjects to a JSON array string.
    Parameters:
      `objects` - collection of SmiObject instances
    Returns:
      JSON array string