Skip to content
Snippets Groups Projects
Commit 0481a98f authored by Saurav Das's avatar Saurav Das
Browse files

Handling portnum correctly in portstats reply when serializing for json

in response to a rest call
parent 7a1dde42
No related branches found
No related tags found
No related merge requests found
/**
* Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior
* University
*
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
......@@ -18,7 +18,10 @@
package org.openflow.protocol.statistics;
import net.floodlightcontroller.core.web.serializers.UShortSerializer;
import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.jboss.netty.buffer.ChannelBuffer;
/**
......@@ -43,6 +46,7 @@ public class OFPortStatisticsReply implements OFStatistics {
/**
* @return the portNumber
*/
@JsonSerialize(using=UShortSerializer.class)
public short getPortNumber() {
return portNumber;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment